@Test
public void testExecuteDeleteDomainRoleMemberRetryException() {

    Mockito.when(mockObjStore.getConnection(true, true)).thenReturn(mockJdbcConn);
    Mockito.when(mockJdbcConn.listPrincipalRoles("dom1", "user.joe"))
            .thenThrow(new ResourceException(410));
    ObjectStore saveStore = zms.dbService.store;
    zms.dbService.store = mockObjStore;
    int saveRetryCount = zms.dbService.defaultRetryCount;
    zms.dbService.defaultRetryCount = 3;
    try {
        zms.dbService.executeDeleteDomainRoleMember(mockDomRsrcCtx, "dom1", "user.joe", adminUser, "unittest");
        fail();
    } catch (ResourceException ex) {
        assertEquals(410, ex.getCode());
    }
    zms.dbService.defaultRetryCount = saveRetryCount;
    zms.dbService.store = saveStore;
}