### Question:
CpanPathUtils { public String filename(final TokenMatcher.State state) { return match(state, "filename"); } 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 public void getFilename() { String result = "filename.extension"; when(matcherState.getTokens()).thenReturn(tokens); when(tokens.get(any())).thenReturn(result); assertThat(underTest.filename(matcherState), is(result)); }