@Test
public void testGetAssertion() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    
    Mockito.when(mockResultSet.next())
        .thenReturn(true);
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_ROLE))
        .thenReturn("role1");
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_RESOURCE))
        .thenReturn("my-domain:*");
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_ACTION))
        .thenReturn("*");
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_EFFECT))
        .thenReturn("ALLOW");
    
    Assertion assertion = jdbcConn.getAssertion("my-domain", "policy1", 101L);
    
    assertEquals("my-domain:role.role1", assertion.getRole());
    assertEquals("my-domain:*", assertion.getResource());
    assertEquals("*", assertion.getAction());
    assertEquals("ALLOW", assertion.getEffect().toString());
    
    Mockito.verify(mockPrepStmt, times(1)).setInt(1, 101);
    Mockito.verify(mockPrepStmt, times(1)).setString(2, "my-domain");
    Mockito.verify(mockPrepStmt, times(1)).setString(3, "policy1");
    
    jdbcConn.close();
}