@Test
public void testAddRoleAssertions() throws SQLException {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    List<Assertion> principalAssertions = new ArrayList<>();
    
    List<Assertion> roleAssertions = new ArrayList<>();
    Assertion assertion = new Assertion().setAction("update").setResource("dom1:resource").setRole("role");
    roleAssertions.add(assertion);
    
    assertion = new Assertion().setAction("update").setResource("dom2:resource1").setRole("role");
    roleAssertions.add(assertion);
    
    assertion = new Assertion().setAction("update").setResource("resource3").setRole("role");
    roleAssertions.add(assertion);
    
    Map<String, String> awsDomains = new HashMap<>();
    awsDomains.put("dom1", "12345");
    
    // we're going to skip 2 invalid assertions - no aws domains
    
    jdbcConn.addRoleAssertions(principalAssertions, roleAssertions, awsDomains);
    assertEquals(1, principalAssertions.size());
    assertEquals("arn:aws:iam::12345:role/resource", principalAssertions.get(0).getResource());
    
    jdbcConn.close();
}