@Test
public void testUpdateQuota() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Quota quota = new Quota().setName("athenz")
            .setAssertion(10).setEntity(11)
            .setPolicy(12).setPublicKey(13)
            .setRole(14).setRoleMember(15)
            .setService(16).setServiceHost(17)
            .setSubdomain(18).setGroup(19).setGroupMember(20);
    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.updateQuota("athenz", quota);
    assertTrue(requestSuccess);
    
    Mockito.verify(mockPrepStmt, times(1)).setString(1, "athenz");
    Mockito.verify(mockPrepStmt, times(1)).setInt(1, 14);
    Mockito.verify(mockPrepStmt, times(1)).setInt(2, 15);
    Mockito.verify(mockPrepStmt, times(1)).setInt(3, 12);
    Mockito.verify(mockPrepStmt, times(1)).setInt(4, 10);
    Mockito.verify(mockPrepStmt, times(1)).setInt(5, 16);
    Mockito.verify(mockPrepStmt, times(1)).setInt(6, 17);
    Mockito.verify(mockPrepStmt, times(1)).setInt(7, 13);
    Mockito.verify(mockPrepStmt, times(1)).setInt(8, 11);
    Mockito.verify(mockPrepStmt, times(1)).setInt(9, 18);
    Mockito.verify(mockPrepStmt, times(1)).setInt(10, 19);
    Mockito.verify(mockPrepStmt, times(1)).setInt(11, 20);
    Mockito.verify(mockPrepStmt, times(1)).setInt(12, 5); // domain id
    jdbcConn.close();
}