@Test
public void checkWrongAutentication() 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, "wrongPassword"));
		
	} catch (Exception e) {
		exception = e;
	}
	assertNull(exception);
	assertNotNull(result);
	assertFalse(result.isPresent());
	
	exception = null;
	result = null;
	
	try {
		result = authenticator.authenticate(new BasicCredentials("userWrong", GrapesTestUtils.PASSWORD_4TEST));
		
	} catch (Exception e) {
		exception = e;
	}
	assertNull(exception);
	assertNotNull(result);
	assertFalse(result.isPresent());
	
	exception = null;
	result = null;
	
	try {
		result = authenticator.authenticate(null);
		
	} catch (Exception e) {
		exception = e;
	}
	assertNull(exception);
	assertNotNull(result);
	assertFalse(result.isPresent());
}