private static final String SOURCE = "com/levelup/java/io/get-last-accessed-time.txt"; Path source; @Before public void setUp() throws IOException, URISyntaxException { source = Paths.get(this.getClass().getClassLoader().getResource(SOURCE) .toURI()); }
@Test public void file_is_other () throws IOException { BasicFileAttributes attr = Files.readAttributes(source, BasicFileAttributes.class); boolean isOtherFileType = attr.isOther(); assertFalse(isOtherFileType); }