### Question:
MultiplicationServiceImpl implements MultiplicationService { @Override public Multiplication createRandomMultiplication() { int factorA = randomGeneratorService.generateRandomFactor(); int factorB = randomGeneratorService.generateRandomFactor(); return new Multiplication(factorA, factorB); } @Autowired  MultiplicationServiceImpl(final RandomGeneratorService randomGeneratorService,
                                     final MultiplicationResultAttemptRepository attemptRepository,
                                     final UserRepository userRepository,
                                     final EventDispatcher eventDispatcher); @Override Multiplication createRandomMultiplication(); @Transactional @Override boolean checkAttempt(final MultiplicationResultAttempt attempt); @Override List<MultiplicationResultAttempt> getStatsForUser(final String userAlias); @Override MultiplicationResultAttempt getResultById(final Long resultId);  }### Answer:
@Test public void createRandomMultiplicationTest() { given(randomGeneratorService.generateRandomFactor()).willReturn(50, 30); Multiplication multiplication = multiplicationServiceImpl.createRandomMultiplication(); assertThat(multiplication.getFactorA()).isEqualTo(50); assertThat(multiplication.getFactorB()).isEqualTo(30); }