### Question:
MultiplicationServiceImpl implements MultiplicationService { @Override public boolean checkAttempt(final MultiplicationResultAttempt resultAttempt) { return resultAttempt.getResultAttempt() == resultAttempt.getMultiplication().getFactorA() * resultAttempt.getMultiplication().getFactorB(); } @Autowired  MultiplicationServiceImpl(final RandomGeneratorService randomGeneratorService); @Override Multiplication createRandomMultiplication(); @Override boolean checkAttempt(final MultiplicationResultAttempt resultAttempt);  }### Answer:
@Test public void checkCorrectAttemptTest() { Multiplication multiplication = new Multiplication(50, 60); User user = new User("john_doe"); MultiplicationResultAttempt attempt = new MultiplicationResultAttempt(user, multiplication, 3000); boolean attemptResult = multiplicationServiceImpl.checkAttempt(attempt); assertThat(attemptResult).isTrue(); }
@Test public void checkWrongAttemptTest() { Multiplication multiplication = new Multiplication(50, 60); User user = new User("john_doe"); MultiplicationResultAttempt attempt = new MultiplicationResultAttempt(user, multiplication, 3010); boolean attemptResult = multiplicationServiceImpl.checkAttempt(attempt); assertThat(attemptResult).isFalse(); }