### Question:
SchemaResourcesPostProcessor implements
        SchemaResolverPostProcessor { @Override public void postProcess(final SchemaResolver resolver) { for (T schemaResource : schemaResources) { try { resolver.registerSchemaSource(transformer .transform(schemaResource)); } catch (TransformationException e) { LOG.error("Transformation of {} resource failed.", schemaResource); } } } SchemaResourcesPostProcessor(
            final Transformer<T, SchemaSource> transformer,
            T... schemaResources); @Override void postProcess(final SchemaResolver resolver);  }### Answer:
@Test public void testProcessIfFirstResourceIsIncorrect() throws Exception { final SchemaSource source = new SchemaSource(new StringInputStream(RESOURCE2), RESOURCE2); postProcessor = new SchemaResourcesPostProcessor<String>( mockTransformer, INCORRECT_RESOURCE, RESOURCE2); expect(mockTransformer.transform(same(INCORRECT_RESOURCE))).andThrow( new TransformationException(new RuntimeException())); mockLogger.error("Transformation of {} resource failed.", INCORRECT_RESOURCE); expectLastCall(); expect(mockTransformer.transform(same(RESOURCE2))).andReturn(source); mockResolver.registerSchemaSource(same(source)); expectLastCall(); EasyMockUnitils.replay(); postProcessor.postProcess(mockResolver); }
@Test public void testProcess() throws Exception { final SchemaSource source1 = new SchemaSource(new StringInputStream(RESOURCE1), RESOURCE1); final SchemaSource source2 = new SchemaSource(new StringInputStream(RESOURCE2), RESOURCE2); expect(mockTransformer.transform(same(RESOURCE1))).andReturn(source1); mockResolver.registerSchemaSource(same(source1)); expectLastCall(); expect(mockTransformer.transform(same(RESOURCE2))).andReturn(source2); mockResolver.registerSchemaSource(same(source2)); expectLastCall(); EasyMockUnitils.replay(); postProcessor.postProcess(mockResolver); }