### Question:
DecisionCombinersResource implements CollectionResourceProvider { @Override public Promise<QueryResponse, ResourceException> queryCollection(Context context, QueryRequest request, QueryResourceHandler handler) { final Set<String> combinerTypeNames = new TreeSet<>(); List<ResourceResponse> combinerTypes = new ArrayList<>(); final String principalName = PrincipalRestUtils.getPrincipalNameFromServerContext(context); combinerTypeNames.addAll(entitlementRegistry.getCombinersShortNames()); for (String combinerTypeName : combinerTypeNames) { final Class<? extends EntitlementCombiner> conditionClass = entitlementRegistry.getCombinerType(combinerTypeName); if (conditionClass == null) { if (debug.warningEnabled()) { debug.warning("DecisionCombinersResource :: QUERY by " + principalName + ": Listed combiner short name not found: " + combinerTypeName); } continue; } final JsonValue json = jsonify(combinerTypeName); if (json != null) { if (json != null) { String id = json.get(JSON_OBJ_TITLE).asString(); combinerTypes.add(newResourceResponse(id, null, json)); } } } QueryResponsePresentation.enableDeprecatedRemainingQueryResponse(request); return QueryResponsePresentation.perform(handler, request, combinerTypes); } @Inject  DecisionCombinersResource(@Named("frRest") Debug debug, EntitlementRegistry entitlementRegistry); @Override Promise<ActionResponse, ResourceException> actionCollection(Context context, ActionRequest request); @Override Promise<ActionResponse, ResourceException> actionInstance(Context context, String resourceId,
            ActionRequest request); @Override Promise<ResourceResponse, ResourceException> createInstance(Context context, CreateRequest 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<QueryResponse, ResourceException> queryCollection(Context context, QueryRequest request,
            QueryResourceHandler handler); @Override Promise<ResourceResponse, ResourceException> readInstance(Context context, String resourceId,
            ReadRequest request); @Override Promise<ResourceResponse, ResourceException> updateInstance(Context context, String resourceId,
            UpdateRequest request);  }### Answer:
@Test public void testSuccessfulJsonificationAndQuery() throws JsonMappingException { SubjectContext mockSubjectContext = mock(SubjectContext.class); RealmContext realmContext = new RealmContext(mockSubjectContext); Context mockServerContext = ClientContext.newInternalClientContext(realmContext); Subject mockSubject = new Subject(); given(mockSubjectContext.getCallerSubject()).willReturn(mockSubject); QueryRequest mockRequest = mock(QueryRequest.class); QueryResourceHandler mockHandler = mock(QueryResourceHandler.class); JsonSchema mockSchema = mock(JsonSchema.class); given(mockMapper.generateJsonSchema((Class<?>) any(Class.class))).willReturn(mockSchema); testResource.queryCollection(mockServerContext, mockRequest, mockHandler); verify(mockHandler, times(1)).handleResource(any(ResourceResponse.class)); }