}
@Test
public void testLogin() {
DatabaseSessionOperationCollectionAspect aspectInstance = getAspect();
ObscuredValueSetMarker marker = (ObscuredValueSetMarker) aspectInstance.getSensitiveValueMarker();
for (LoginAction action : LoginAction.values()) {
Login mockLogin = Mockito.mock(Login.class);
Mockito.when(mockLogin.getUserName()).thenReturn("username:" + action.name());
Mockito.when(mockLogin.getPassword()).thenReturn("password:" + action.name());
mockSession.setLogin(mockLogin);
action.executeAction(mockSession, mockLogin);
Operation op = assertDatabaseSessionOperation(action.name(), "login");
action.assertExecutionResult(op, mockLogin, marker);
// prepare for next iteration
Mockito.reset(spiedOperationCollector);
marker.clear();
}
}