@Test public void doAction() { String path = "path"; when(resource.getPath()).thenReturn(path); PrintPath action = new PrintPath(); String result = action.doAction(resource); assertTrue(result.contains(path)); }
@Override public String doAction(@Nonnull Resource resource) { return "\n> " + resource.getPath(); }
PrintPath implements Action { @Override public String doAction(@Nonnull Resource resource) { return "\n> " + resource.getPath(); } }
PrintPath implements Action { @Override public String doAction(@Nonnull Resource resource) { return "\n> " + resource.getPath(); }  }
PrintPath implements Action { @Override public String doAction(@Nonnull Resource resource) { return "\n> " + resource.getPath(); }  @Override String doAction(@Nonnull Resource resource); }
PrintPath implements Action { @Override public String doAction(@Nonnull Resource resource) { return "\n> " + resource.getPath(); }  @Override String doAction(@Nonnull Resource resource);  }