@Test public void deleteShouldNotBeSupported() { // Given ServerContext context = mock(ServerContext.class); DeleteRequest request = mock(DeleteRequest.class); ResultHandler<Resource> handler = mock(ResultHandler.class); // When resource.deleteInstance(context, "RESOURCE_SET_UID", request, handler); // Then verify(handler).handleError(Matchers.<NotSupportedException>anyObject()); }