### Question:
CpanPathUtils { public TokenMatcher.State matcherState(final Context context) { return context.getAttributes().require(TokenMatcher.State.class); } 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 getMatcherStateFromContext() { when(context.getAttributes()).thenReturn(attributesMap); when(attributesMap.require(TokenMatcher.State.class)).thenReturn(matcherState); assertThat(underTest.matcherState(context), is(matcherState)); }