### Question:
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(int expectedCount); @Factory static Matcher<Path> hasFilesCount(int expectedCount, String glob);  }### Answer:
@Test public void shouldIsDirectory() throws Exception { assertThat(directory, isDirectory()); }
@Test(expected = AssertionError.class) public void shouldFailIfNotADirectory() throws Exception { assertThat(directory.resolve("file"), isDirectory()); }
@Test public void shouldNotIsDirectory() throws Exception { Path file = directory.resolve("file"); Files.write(file, "content".getBytes(StandardCharsets.UTF_8)); assertThat(file, not(isDirectory())); }
@Test public void shouldNotFailIfFileDoesNotExists() throws Exception { Path file = directory.resolve("file"); assertThat(file, not(isDirectory())); }