private UsernamePasswordCredentials login(final String username, final String password, final String attribute) {
        val dbProfileService = new DbProfileService(ds, attribute);
        dbProfileService.setPasswordEncoder(DbServer.PASSWORD_ENCODER);

        val credentials = new UsernamePasswordCredentials(username, password);
        dbProfileService.validate(null, credentials);

        return credentials;
    }
Tests the {@link DbProfileService}.

@author Jerome Leleu
@since 1.8.0
pac4j-sql/src/test/java/org/pac4j/sql/profile/service/DbProfileServiceTests.java