### Question:
CpanPathUtils { public String path(final TokenMatcher.State state) { return match(state, "path"); } CpanPathUtils(); String path(final TokenMatcher.State state); String path(final String path, final String filename); String filename(final TokenMatcher.State state); String extension(final TokenMatcher.State state); String archivePath(final String path, final String filename, final String extension); String checksumPath(final String path); TokenMatcher.State matcherState(final Context context);  }### Answer:
@Test(expected = NullPointerException.class) public void matchWithNullResultThrowsNullPointerException() { when(matcherState.getTokens()).thenReturn(tokens); underTest.path(matcherState); }
@Test(expected = NullPointerException.class) public void matchWithNullMatcherStateThrowsNullPointerException() { underTest.path(null); }
@Test public void getPathWithPathAndFilename() { String path = "path"; String filename = "filename.extension"; String expectedResult = path + "/" + filename; assertThat(underTest.path(path, filename), is(expectedResult)); }