userTO = createUser(userTO);
assertNotNull(userTO);
long userId = userTO.getId();
UserService userService2 = setupCredentials(userService, UserService.class,
userTO.getUsername(), "password123");
assertEquals(0, getFailedLogins(userService2, userId));
// authentications failed ...
UserService userService3 = setupCredentials(userService, UserService.class,
userTO.getUsername(), "wrongpwd1");
assertReadFails(userService3, userId);
assertReadFails(userService3, userId);
// reset admin credentials for restTemplate
super.resetRestTemplate();
assertEquals(2, getFailedLogins(userService, userId));
UserService userService4 = setupCredentials(userService, UserService.class,
userTO.getUsername(), "password123");
assertEquals(0, getFailedLogins(userService4, userId));
}