@Test
public void testInsertRole() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Role role = new Role().setName("my-domain:role.role1").setAuditEnabled(true)
            .setSelfServe(true);
    Mockito.doReturn(1).when(mockPrepStmt).executeUpdate();
    Mockito.when(mockResultSet.next()).thenReturn(true);
    Mockito.doReturn(5).when(mockResultSet).getInt(1); // return domain id
    
    boolean requestSuccess = jdbcConn.insertRole("my-domain", role);
    assertTrue(requestSuccess);
    
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "my-domain");
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "role1");
    Mockito.verify(mockPrepStmt, times(1)).setInt(2, 5);
    Mockito.verify(mockPrepStmt, times(1)).setString(3, "");
    Mockito.verify(mockPrepStmt, times(1)).setBoolean(4, true);
    Mockito.verify(mockPrepStmt, times(1)).setBoolean(5, true);
    Mockito.verify(mockPrepStmt, times(1)).setInt(6, 0);
    Mockito.verify(mockPrepStmt, times(1)).setInt(7, 0);
    Mockito.verify(mockPrepStmt, times(1)).setInt(8, 0);
    Mockito.verify(mockPrepStmt, times(1)).setString(9, "");
    Mockito.verify(mockPrepStmt, times(1)).setInt(10, 0);
    Mockito.verify(mockPrepStmt, times(1)).setInt(11, 0);
    Mockito.verify(mockPrepStmt, times(1)).setInt(12, 0);
    Mockito.verify(mockPrepStmt, times(1)).setBoolean(13, false);
    Mockito.verify(mockPrepStmt, times(1)).setString(14, "");
    Mockito.verify(mockPrepStmt, times(1)).setString(15, "");
    Mockito.verify(mockPrepStmt, times(1)).setString(16, "");
    jdbcConn.close();
}