@Test
public void testUpdateDomain() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Domain domain = new Domain().setName("my-domain")
            .setEnabled(true)
            .setAuditEnabled(false)
            .setDescription("my domain")
            .setId(UUID.fromString("e5e97240-e94e-11e4-8163-6d083f3f473f"))
            .setOrg("cloud_services")
            .setAccount("123456789")
            .setYpmId(1011)
            .setApplicationId("application_id")
            .setCertDnsDomain("athenz.cloud")
            .setMemberExpiryDays(45)
            .setServiceExpiryDays(50)
            .setGroupExpiryDays(55)
            .setTokenExpiryMins(10)
            .setServiceCertExpiryMins(20)
            .setRoleCertExpiryMins(30)
            .setSignAlgorithm("ec")
            .setUserAuthorityFilter("OnShore");
    Mockito.doReturn(1).when(mockPrepStmt).executeUpdate();
    boolean requestSuccess = jdbcConn.updateDomain(domain);
    assertTrue(requestSuccess);
    
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "my domain");
    Mockito.verify(mockPrepStmt, times(1)).setString(2, "cloud_services");
    Mockito.verify(mockPrepStmt, times(1)).setString(3, "e5e97240-e94e-11e4-8163-6d083f3f473f");
    Mockito.verify(mockPrepStmt, times(1)).setBoolean(4, true);
    Mockito.verify(mockPrepStmt, times(1)).setBoolean(5, false);
    Mockito.verify(mockPrepStmt, times(1)).setString(6, "123456789");
    Mockito.verify(mockPrepStmt, times(1)).setInt(7, 1011);
    Mockito.verify(mockPrepStmt, times(1)).setString(8, "application_id");
    Mockito.verify(mockPrepStmt, times(1)).setString(9, "athenz.cloud");
    Mockito.verify(mockPrepStmt, times(1)).setInt(10, 45);
    Mockito.verify(mockPrepStmt, times(1)).setInt(11, 10);
    Mockito.verify(mockPrepStmt, times(1)).setInt(12, 20);
    Mockito.verify(mockPrepStmt, times(1)).setInt(13, 30);
    Mockito.verify(mockPrepStmt, times(1)).setString(14, "ec");
    Mockito.verify(mockPrepStmt, times(1)).setInt(15, 50);
    Mockito.verify(mockPrepStmt, times(1)).setString(16, "OnShore");
    Mockito.verify(mockPrepStmt, times(1)).setInt(17, 55);
    Mockito.verify(mockPrepStmt, times(1)).setString(18, "my-domain");
    jdbcConn.close();
}