@Test
public void testCountGroupMembers() throws Exception {

    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Mockito.when(mockResultSet.getInt(1)).thenReturn(5).thenReturn(7)
            .thenReturn(4); // return domain/group id/count
    Mockito.when(mockResultSet.next()).thenReturn(true);
    assertEquals(jdbcConn.countGroupMembers("my-domain", "group1"), 4);
    jdbcConn.close();
}