@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);
}