@Test public void convertItemToNameValuePair(){ Item item = new Item(); Entity albumEntity = new Entity(); albumEntity.setTitle("New Album"); albumEntity.setName("AlbumName"); item.setEntity(albumEntity ); String value = "{\"title\":\"This is my Sample Album\",\"name\":\"Sample Album\",\"type\":\"album\"}"; BasicNameValuePair basicNameValuePair = new BasicNameValuePair("entity",value); assertEquals(basicNameValuePair, ItemUtils.convertJSONStringToNameValuePair(value)); }
public static NameValuePair convertJSONStringToNameValuePair(String value) { NameValuePair nameValuePair = new BasicNameValuePair("entity", value); return nameValuePair; }
ItemUtils { public static NameValuePair convertJSONStringToNameValuePair(String value) { NameValuePair nameValuePair = new BasicNameValuePair("entity", value); return nameValuePair; } }
ItemUtils { public static NameValuePair convertJSONStringToNameValuePair(String value) { NameValuePair nameValuePair = new BasicNameValuePair("entity", value); return nameValuePair; }  }
ItemUtils { public static NameValuePair convertJSONStringToNameValuePair(String value) { NameValuePair nameValuePair = new BasicNameValuePair("entity", value); return nameValuePair; }  static Item parseJSONToItem(JSONObject jsonResult); static List<Item> parseJSONToMultipleItems(JSONObject jsonResult); static String convertAlbumEntityToJSON(Entity entity); static String convertPhotoEntityToJSON(Entity entity); static NameValuePair convertJSONStringToNameValuePair(String value); static String convertJsonResultToApiKey(String jsonResult); static String convertJsonStringToUrl(String jsonResult); static Integer getItemIdFromUrl(String createdAlbumUrl); }
ItemUtils { public static NameValuePair convertJSONStringToNameValuePair(String value) { NameValuePair nameValuePair = new BasicNameValuePair("entity", value); return nameValuePair; }  static Item parseJSONToItem(JSONObject jsonResult); static List<Item> parseJSONToMultipleItems(JSONObject jsonResult); static String convertAlbumEntityToJSON(Entity entity); static String convertPhotoEntityToJSON(Entity entity); static NameValuePair convertJSONStringToNameValuePair(String value); static String convertJsonResultToApiKey(String jsonResult); static String convertJsonStringToUrl(String jsonResult); static Integer getItemIdFromUrl(String createdAlbumUrl);  }