@Test
public void pathWithState() throws Exception {

  final Map<String, String> someMap = Collections.singletonMap("path", fakePath);
  when(state.getTokens())
      .thenReturn(someMap);
  String path = path(state);
  assertThat(path, is(equalTo(fakePath)));
}