@Test public void test() { StreamToUrlTransformer sut = new StreamToUrlTransformer(); String result = sut.getUrl("5", "{\"foo\":\"bar\"}"); assertEquals("saved/5", result); }
public String getUrl(final String streamId, final String jsonRequest) { if (streamId == null) { JSONObject query = JSONParser.parse(jsonRequest).isObject(); query.toString(); return query.toString(); } else { return "saved/" + streamId; } }
StreamToUrlTransformer { public String getUrl(final String streamId, final String jsonRequest) { if (streamId == null) { JSONObject query = JSONParser.parse(jsonRequest).isObject(); query.toString(); return query.toString(); } else { return "saved/" + streamId; } } }
StreamToUrlTransformer { public String getUrl(final String streamId, final String jsonRequest) { if (streamId == null) { JSONObject query = JSONParser.parse(jsonRequest).isObject(); query.toString(); return query.toString(); } else { return "saved/" + streamId; } }  }
StreamToUrlTransformer { public String getUrl(final String streamId, final String jsonRequest) { if (streamId == null) { JSONObject query = JSONParser.parse(jsonRequest).isObject(); query.toString(); return query.toString(); } else { return "saved/" + streamId; } }  String getUrl(final String streamId, final String jsonRequest); }
StreamToUrlTransformer { public String getUrl(final String streamId, final String jsonRequest) { if (streamId == null) { JSONObject query = JSONParser.parse(jsonRequest).isObject(); query.toString(); return query.toString(); } else { return "saved/" + streamId; } }  String getUrl(final String streamId, final String jsonRequest);  }