### Question:
UserManagementAndSecurityModule implements eu.cloud4soa.api.soa.UserManagementAndSecurityModule { @Override public UserInstance authenticateUser (String username, String password) throws SOAException{ UserInstance userInstance; try { userInstance = userProfilesRepository.getUserInstanceFromAccountName( username ); } catch (RepositoryException ex) { throw new SOAException(Response.Status.INTERNAL_SERVER_ERROR, ex.getMessage()); } if(userInstance == null){ String error = "No user instance found having the username: "+username; logger.debug(error); throw new SOAException(Response.Status.BAD_REQUEST, error); } List<User> users = userrepository.find("username = ? AND password = ?", username, password); logger.info("users-size: " + users.size()); if(users.size()>1){ String error = "More than one user found having the username: "+username; logger.debug(error); throw new SOAException(Response.Status.INTERNAL_SERVER_ERROR, error); } if(users.isEmpty()){ String error = "Login failed: wrong username or password"; logger.debug(error); throw new SOAException(Response.Status.BAD_REQUEST, error); } return userInstance; }  @Required void setRepositoryManager(RepositoryManager repositoryManager); @Required void setUserProfilesRepository(UserProfilesRepository userProfilesRepository); @Required void setPaaSOfferingProfilesRepository(PaaSOfferingProfilesRepository paaSOfferingProfilesRepository); @Override Response createNewAccount(UserInstance userInstance ,String username, String password); @Override Response storeTurtleUserProfile(String userProfile, String username, String password); @Override UserInstance getUserInstance(String userInstanceUriId); @Override Response updateUserInstance(UserInstance userInstance); @Override //TODO Input pending of actual logging implementation /* UserInstance authenticateUser (String username, String password) throws SOAException { */ UserInstance authenticateUser(String username, String password); @Override boolean isAccountNameInUse(String accountName); @Override Response storeUserCredentialsForPaaS(String userInstanceUriId, String paaSInstanceUriId, String publicKey, String secretKey, String accountName); @Override Response removeUserCredentialsForPaaS(String userInstanceUriId, String paaSInstanceUriId); @Override Response updateUserCredentialsForPaaS(String userInstanceUriId, String paaSInstanceUriId, String publicKey, String secretKey, String accountName); @Override UserPaaSCredentials readUserCredentialsForPaaS(String userInstanceUriId, String paaSInstanceUriId); @Override List<UserPaaSCredentials> readAllUserCredentialsForPaaS(String userInstanceUriId); void close();  }### Answer:
@Ignore @Test public void TestAuthenticateUser() { try { userManagementAndSecurityModule.authenticateUser("username", "password"); } catch (SOAException ex) { Assert.fail("authenticateUser method has thrown an exception!"); } }