@Test
public void testInsertPolicy() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Policy policy = new Policy().setName("my-domain:policy.policy1");
    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.insertPolicy("my-domain", policy);
    assertTrue(requestSuccess);
    
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "my-domain");
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "policy1");
    Mockito.verify(mockPrepStmt, times(1)).setInt(2, 5);
    jdbcConn.close();
}