### Question:
ResourceSetRegistrationEndpoint extends ServerResource { @Delete public Representation deleteResourceSet() throws NotFoundException, ServerException { if (!isConditionalRequest()) { throw new ResourceException(512, "precondition_failed", "Require If-Match header to delete Resource Set", null); } ResourceSetStore store = providerSettingsFactory.get(requestFactory.create(getRequest())).getResourceSetStore(); ResourceSetDescription resourceSetDescription = store.read(getResourceSetId(), getResourceOwnerId()); OAuth2Request oAuth2Request = requestFactory.create(getRequest()); for (ResourceSetRegistrationHook hook : hooks) { hook.resourceSetDeleted(oAuth2Request.<String>getParameter("realm"), resourceSetDescription); } labelRegistration.updateLabelsForDeletedResourceSet(resourceSetDescription); store.delete(getResourceSetId(), getResourceOwnerId()); return createEmptyResponse(); } @Inject  ResourceSetRegistrationEndpoint(OAuth2ProviderSettingsFactory providerSettingsFactory,
            ResourceSetDescriptionValidator validator, OAuth2RequestFactory<?, Request> requestFactory,
            Set<ResourceSetRegistrationHook> hooks, ResourceSetLabelRegistration labelRegistration,
            ExtensionFilterManager extensionFilterManager, ExceptionHandler exceptionHandler,
            UmaLabelsStore umaLabelsStore, JacksonRepresentationFactory jacksonRepresentationFactory); @Post Representation createResourceSet(JsonRepresentation entity); @Put Representation updateResourceSet(JsonRepresentation entity); @Get Representation readOrListResourceSet(); @Delete Representation deleteResourceSet();  }### Answer:
@Test public void shouldDeleteResourceSetDescription() throws Exception { setUriResourceSetId(); addCondition(); Representation responseRep = endpoint.deleteResourceSet(); verify(store).delete("RESOURCE_SET_ID", "RESOURCE_OWNER_ID"); assertThat(responseRep.getText()).isNull(); ArgumentCaptor<Status> responseStatusCaptor = ArgumentCaptor.forClass(Status.class); verify(response).setStatus(responseStatusCaptor.capture()); assertThat(responseStatusCaptor.getValue().getCode()).isEqualTo(204); verify(labelRegistration).updateLabelsForDeletedResourceSet(any(ResourceSetDescription.class)); }