P2PathUtils { public static State matcherState(final Context context) { return context.getAttributes().require(State.class); } private  P2PathUtils(); static String path(final State state); static String maybePath(final State state); static String path(final String path, final String filename); static String path(final String path, final String filename, final String extension); static String binaryPath(final String path, final String name, final String version); static String name(final State state); static String filename(final State state); static String version(final State state); static String componentName(final State state); static String componentVersion(final State state); static String extension(final State state); static State matcherState(final Context context); static P2Attributes toP2Attributes(final String path, final State state); static P2Attributes toP2AttributesBinary(final String path, final State state); static P2Attributes getBinaryAttributesFromBlobName(final String blobName); static P2Attributes getPackageAttributesFromBlob(final StorageFacet storageFacet,
                                                          final P2TempBlobUtils p2TempBlobUtils,
                                                          final Blob blob,
                                                          final String blobName); static AssetKind getAssetKind(final String path); static final String PLUGIN_NAME; }
@Test public void matcherState() throws Exception { when(context.getAttributes()) .thenReturn(attributesMap); when(attributesMap.require(TokenMatcher.State.class)) .thenReturn(state); TokenMatcher.State testState = P2PathUtils.matcherState(context); assertThat(testState, instanceOf(TokenMatcher.State.class)); }