### Question:
FallbackAwareWroModelFactory extends WroModelFactoryDecorator { @Override public WroModel create() { WroModel newModel = null; try { newModel = super.create(); } catch (final WroRuntimeException e) { LOG.error("Error while creating the model", e); } if (newModel == null) { LOG.warn("Couldn't load new model, reusing last Valid Model!"); if (lastValidModel == null) { throw new WroRuntimeException("No valid model was found!"); } return lastValidModel; } lastValidModel = newModel; return lastValidModel; } FallbackAwareWroModelFactory(final WroModelFactory decorated); @Override WroModel create();  }### Answer:
@Test public void testLastValidIsOK() { Assert.assertNotNull(fallbackAwareModelFactory.create()); fallbackAwareModelFactory.destroy(); Assert.assertNotNull(fallbackAwareModelFactory.create()); }
@Test(expected = WroRuntimeException.class) public void testWithoutLastValidThrowsException() { Assert.assertNotNull(xmlModelFactory.create()); }