old_contents: let createdUserIds = [];
  const tempPinIds = [];
  
  const rnd = () => Math.round(Math.random() * 10000);
  
  const createTestUser = (app, opt) => async ({
  	// required fields for user
  	firstName = 'Max',
  	lastName = 'Mustermann',
  	birthday = undefined,
  	email = `max${`${Date.now()}_${rnd()}`}@mustermann.de`,
  	schoolId = opt.schoolId,
  	accounts = [], // test if it has a effect
  	roles = [],
  	discoverable = false,
  	firstLogin = false,
  	// manual cleanup, e.g. when testing delete:
  	manualCleanup = false,
  } = {}) => {
  	const registrationPin = await app.service('registrationPins').create({ email, verified: true, silent: true });
  	tempPinIds.push(registrationPin);
  
  	const user = await app.service('users').create({
  		firstName,
  		lastName,
  		birthday,
  		email,
  		schoolId,
  		accounts,
  		roles,
  		discoverable,
  		preferences: {
  			firstLogin,
  		},
  	});
  
  	if (!manualCleanup) {
  		createdUserIds.push(user._id.toString());
  	}
  	return user;
  };
  
  const cleanup = (app) => () => {
  	const ids = createdUserIds;
  	createdUserIds = [];
  	return ids.map((id) => app.service('users').remove(id));
  };
  
  module.exports = (app, opt) => ({
  	create: createTestUser(app, opt),
  	cleanup: cleanup(app),
  	info: createdUserIds,
  	tempPinIds,
  });
  
new_contents: const { registrationPinModel } = require('../../../../src/services/user/model');
  
  let createdUserIds = [];
  const tempPinIds = [];
  
  const rnd = () => Math.round(Math.random() * 10000);
  
  const createTestUser = (app, opt) => async ({
  	// required fields for user
  	firstName = 'Max',
  	lastName = 'Mustermann',
  	birthday = undefined,
  	email = `max${`${Date.now()}_${rnd()}`}@mustermann.de`,
  	schoolId = opt.schoolId,
  	accounts = [], // test if it has a effect
  	roles = [],
  	discoverable = false,
  	firstLogin = false,
  	// manual cleanup, e.g. when testing delete:
  	manualCleanup = false,
  } = {}) => {
  	const registrationPin = await app.service('registrationPins').create({ email, verified: true, silent: true });
  	tempPinIds.push(registrationPin);
  
  	const user = await app.service('users').create({
  		firstName,
  		lastName,
  		birthday,
  		email,
  		schoolId,
  		accounts,
  		roles,
  		discoverable,
  		preferences: {
  			firstLogin,
  		},
  	});
  
  	if (!manualCleanup) {
  		createdUserIds.push(user._id.toString());
  	}
  	return user;
  };
  
  const cleanup = (app) => () => {
  	const ids = createdUserIds;
  	createdUserIds = [];
  	const promises = ids.map((id) => app.service('users').remove(id));
  	promises.push(
  		registrationPinModel.deleteMany({ _id: { $in: tempPinIds.map((p) => p._id) } }),
  	);
  	return Promise.all(promises);
  };
  
  module.exports = (app, opt) => ({
  	create: createTestUser(app, opt),
  	cleanup: cleanup(app),
  	info: createdUserIds,
  	tempPinIds,
  });
  
subject: clear pins for new method