public void testLastModifiedWorksWithResourceThatDoesNotSupportFileBasedReading() throws Exception {
MockControl mock = MockControl.createControl(Resource.class);
Resource resource = (Resource) mock.getMock();
// underlying File is asked for so that the last modified time can be checked...
resource.lastModified();
mock.setReturnValue(100, 2);
// does not support File-based reading; delegates to InputStream-style reading...
resource.getFile();
mock.setThrowable(new FileNotFoundException());
resource.getInputStream();