SystemFileData implements FileData { @Override public long getSize() { return file.length(); } SystemFileData(File file, Path pathWithinRoot);  SystemFileData(File file, Path pathWithinRoot, Path pathWithinModule); @Override @MustBeClosed InputStream getInputStream(); @Override Path getPathWithinRoot(); @Override Path getPathWithinModule(); Path getSystemPath(); @Override long getSize();  }
@Test public void getsCorrectSize() throws Exception { File file = TestUtils.getTestDataFile(PATH); SystemFileData systemFileData = new SystemFileData(file, Paths.get("foobar.txt")); assertThat(systemFileData.getSize()).isEqualTo(1408431L); }