OzarkModelProcessor implements ModelProcessor { @Override public ResourceModel processResourceModel(ResourceModel resourceModel, Configuration configuration) { ResourceModel.Builder rmb = new ResourceModel.Builder(false); resourceModel.getResources().forEach(r -> { rmb.addResource(processResource(r)); }); return rmb.build(); }  @Override ResourceModel processResourceModel(ResourceModel resourceModel, Configuration configuration); @Override ResourceModel processSubResource(ResourceModel subResourceModel, Configuration configuration);  }
@Test public void processResourceModel() { ResourceModel.Builder rmb = new ResourceModel.Builder(false); Resource resource = Resource.builder(SomeController.class).build(); rmb.addResource(resource); ResourceModel processedModel = new OzarkModelProcessor().processResourceModel(rmb.build(), null); Resource processedResource = processedModel.getResources().get(0); processedResource.getResourceMethods().forEach(m -> assertTrue(m.getProducedTypes().contains(MediaType.TEXT_HTML_TYPE))); }