@Test
public void testExecutePutQuotaFailureRetry() {

    String domainName = "putquota";
    Mockito.when(mockObjStore.getConnection(true, true)).thenReturn(mockJdbcConn);
    Quota quota = new Quota();
    Mockito.when(mockJdbcConn.insertQuota(domainName, quota))
            .thenThrow(new ResourceException(ResourceException.CONFLICT, "conflict"));
    ObjectStore saveStore = zms.dbService.store;
    zms.dbService.store = mockObjStore;
    int saveRetryCount = zms.dbService.defaultRetryCount;
    zms.dbService.defaultRetryCount = 2;
    try {
        zms.dbService.executePutQuota(mockDomRsrcCtx, domainName, quota,
                auditRef, "putQuota");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ResourceException.CONFLICT, ex.getCode());
    }
    zms.dbService.defaultRetryCount = saveRetryCount;
    zms.dbService.store = saveStore;
}