### Question:
ResourceSetResource implements CollectionResourceProvider { @Override public Promise<ResourceResponse, ResourceException> patchInstance(Context context, String resourceId, PatchRequest request) { return new NotSupportedException().asPromise(); } @Inject  ResourceSetResource(ResourceSetService resourceSetService, ContextHelper contextHelper,
            UmaLabelsStore umaLabelsStore, ResourceSetDescriptionValidator validator,
            ExtensionFilterManager extensionFilterManager); @Override Promise<ResourceResponse, ResourceException> createInstance(Context context, CreateRequest request); @Override Promise<ResourceResponse, ResourceException> readInstance(Context context, String resourceId,
            ReadRequest request); @Override Promise<ActionResponse, ResourceException> actionCollection(Context context, ActionRequest request); @Override Promise<QueryResponse, ResourceException> queryCollection(final Context context, final QueryRequest request,
            final QueryResourceHandler handler); @Override Promise<ResourceResponse, ResourceException> updateInstance(Context context, String resourceId,
            UpdateRequest request); @Override Promise<ResourceResponse, ResourceException> deleteInstance(Context context, String resourceId,
            DeleteRequest request); @Override Promise<ResourceResponse, ResourceException> patchInstance(Context context, String resourceId,
            PatchRequest request); @Override Promise<ActionResponse, ResourceException> actionInstance(Context context, String resourceId,
            ActionRequest request);  }### Answer:
@Test public void patchShouldNotBeSupported() { Context context = mock(Context.class); PatchRequest request = mock(PatchRequest.class); Promise<ResourceResponse, ResourceException> promise = resource.patchInstance(context, "RESOURCE_SET_UID", request); AssertJPromiseAssert.assertThat(promise).failedWithException().isInstanceOf(NotSupportedException.class); }
@Test public void patchShouldNotBeSupported() { Context context = mock(Context.class); PatchRequest request = mock(PatchRequest.class); Promise<ResourceResponse, ResourceException> promise = resource.patchInstance(context, "RESOURCE_SET_UID", request); assertThat(promise).failedWithException().isInstanceOf(NotSupportedException.class); }