@Test
public void checkAutentication() throws AuthenticationException, UnknownHostException{

       final RepositoryHandler repositoryHandler = GrapesTestUtils.getRepoHandlerMock();
	final GrapesAuthenticator authenticator = new GrapesAuthenticator(repositoryHandler);
	
	Exception exception = null;
	Optional<DbCredential> result = null;
	
	try {
		result = authenticator.authenticate(new BasicCredentials(GrapesTestUtils.USER_4TEST, GrapesTestUtils.PASSWORD_4TEST));
		
	} catch (Exception e) {
		exception = e;
	}
	assertNull(exception);
	assertNotNull(result);
	assertTrue(result.isPresent());
       final List<AvailableRoles> roles = result.get().getRoles();
       assertNotNull(roles);
       assertTrue(roles.contains(AvailableRoles.ARTIFACT_CHECKER));
       assertTrue(roles.contains(AvailableRoles.DATA_DELETER));
       assertTrue(roles.contains(AvailableRoles.DATA_UPDATER));
       assertTrue(roles.contains(AvailableRoles.DEPENDENCY_NOTIFIER));
       assertTrue(roles.contains(AvailableRoles.LICENSE_CHECKER));
}