@Test
public void componentName() throws Exception {

  final Map<String, String> someMap = Collections.singletonMap("name", fakeFileName);
  when(state.getTokens())
      .thenReturn(someMap);
  String componentName = P2PathUtils.componentName(state);
  assertThat(componentName, is(equalTo(fakeComponentName)));
}