### Question:
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } 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 shouldContains() throws Exception { Files.write(directory.resolve("file"), "content".getBytes(StandardCharsets.UTF_8)); assertThat(directory, contains("file")); }
@Test(expected = AssertionError.class) public void shouldFailIfNotContains() throws Exception { assertThat(directory, contains("file")); }
@Test public void shouldNotContains() throws Exception { assertThat(directory, not(contains("file"))); }