RecipientList extends Base { public StoredRecipientList asStoredRecipientList() { StoredRecipientList storedRecipientList = new StoredRecipientList(); storedRecipientList.setListId(this.getId()); return storedRecipientList; }  StoredRecipientList asStoredRecipientList();  }
@Test public void testRecipientsListToStoredRecipientsListConvertation() { Gson gson = new Gson(); RecipientList recipientList = gson.fromJson(this.RECIPIENT_LIST_JSON, RecipientList.class); StoredRecipientList storedRecipientsList = recipientList.asStoredRecipientList(); Assert.assertEquals(storedRecipientsList.getListId(), "unique_id_4_graduate_students_list"); }