TimedErrorFactory implements LoadErrorFactory { @Override public LoadError createErrorLog(String url, Exception exception, Mirage.Source source) { return new TimedLoadError(timeToPersist, exception); } TimedErrorFactory();  TimedErrorFactory(long timeToPersist); @Override LoadError createErrorLog(String url, Exception exception, Mirage.Source source);  }
@Test public void testCreatesLog() { TimedErrorFactory factory = new TimedErrorFactory(); LoadError error = factory.createErrorLog("something", new IOException("test exception"), Mirage.Source.EXTERNAL); Assert.assertNotNull(error); }
@Test public void testCreatesLogTimed() { TimedErrorFactory factory = new TimedErrorFactory(3000); LoadError error = factory.createErrorLog("something", new IOException("test exception"), Mirage.Source.EXTERNAL); Assert.assertNotNull(error); }