ForwardingTemplateSource extends AbstractTemplateSource { @Override public long lastModified() { return source.lastModified(); } ForwardingTemplateSource(final TemplateSource source); @Override String content(final Charset charset); @Override String filename(); @Override long lastModified();  }
@Test public void lastModified() throws IOException { long lastModified = 716L; TemplateSource source = createMock(TemplateSource.class); expect(source.lastModified()).andReturn(lastModified); replay(source); assertEquals(lastModified, new ForwardingTemplateSource(source).lastModified()); verify(source); }