@Test
public void testRetrieveUser() {

    Optional<User> result = engineManager.retrieveUser(ERROR);
    verify(engine).retrieveUser(ERROR);
    assertFalse(result.isPresent());
    result = engineManager.retrieveUser("user");
    verify(engine).retrieveUser("user");
    assertTrue(result.isPresent());
    assertEquals(user, result.get());
}