GroupProviderServiceSQLImpl implements GroupProviderService { @Override public List<GroupProviderUserOauth> getGroupProviderUserOauths(String userId) { List<GroupProviderUserOauth> gpUserOauths; try { RowMapper<GroupProviderUserOauth> rowMapper = new GroupProviderUserOauthRowMapper() ; gpUserOauths = this.jdbcTemplate.query( SELECT_USER_OAUTH, new Object[] {userId}, rowMapper); } catch (EmptyResultDataAccessException e) { gpUserOauths = new ArrayList<GroupProviderUserOauth>(); } return gpUserOauths; } GroupProviderServiceSQLImpl(JdbcTemplate jdbcTemplate); @Override List<GroupProviderUserOauth> getGroupProviderUserOauths(String userId); @Override GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier); @Override GroupProvider getGroupProviderByStringIdentifier(String identifier); @Override List<GroupProvider> getOAuthGroupProviders(String userId); @Override List<GroupProvider> getAllGroupProviders();  }
@Test public void testGetGroupProviderUserOauths() { List<GroupProviderUserOauth> oauths = groupProviderServiceSQL.getGroupProviderUserOauths("urn:collab:person:test.surfguest.nl:tester"); assertEquals(1, oauths.size()); GroupProviderUserOauth groupProviderUserOauth = oauths.get(0); assertEquals("avans", groupProviderUserOauth.getProvider()); }