@DELETE
    @Path("{id}")
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public Response removeSecurityGroup(@PathParam("id") String id) {
        log.trace(String.format(MESSAGE, "REMOVE " + id));

        if (!haService.isActive()
                && !DEFAULT_ACTIVE_IP_ADDRESS.equals(haService.getActiveIp())) {
            return syncDelete(haService, SECURITY_GROUPS, id);
        }

        adminService.removeSecurityGroup(id);
        return noContent().build();
    }
@Test
    public void testDeleteSecurityGroupWithDeletionOperation() {
        expect(mockOpenstackHaService.isActive()).andReturn(true).anyTimes();
        replay(mockOpenstackHaService);
        mockOpenstackSecurityGroupAdminService.removeSecurityGroup(anyString());
        replay(mockOpenstackSecurityGroupAdminService);

        final WebTarget wt = target();

        Response response = wt.path(PATH + "/2076db17-a522-4506-91de-c6dd8e837028")
                .request(MediaType.APPLICATION_JSON_TYPE)
                .delete();
        final int status = response.getStatus();

        assertThat(status, is(204));

        verify(mockOpenstackSecurityGroupAdminService);
    }