use of com.yahoo.athenz.zms.Assertion in project athenz by yahoo.
the class JDBCConnectionTest method testGetAssertionNoMatch.
@Test
public void testGetAssertionNoMatch() throws Exception {
JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
Mockito.when(mockResultSet.next()).thenReturn(false);
Assertion assertion = jdbcConn.getAssertion("my-domain", "policy1", Long.valueOf(101));
assertNull(assertion);
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();
}
Aggregations