@Test
public void testCheckPasswordWithEncryption() {

    boolean result = engine.checkPassword(username, password);
    assertTrue(result);
    when(encryption.checkPassword(anyString(), anyString())).thenReturn(false);
    result = engine.checkPassword(username, "password");
    assertFalse(result);
}