Deck implements Parcelable { public String getDestinationLanguagesForDisplay() { StringBuilder builder = new StringBuilder(); for (Dictionary dictionary : dictionaries) { builder.append(dictionary.getLanguage().toUpperCase()).append(LANGUAGE_LIST_DELIMITER); } return builder.toString().trim(); } Deck(String title, String author, String externalId, long dbId, long timestamp,
                boolean locked, String sourceLanguage, Dictionary[] dictionaries);  Deck(String title, String author, String externalId, long timestamp, boolean locked,
                String sourceLanguage);  Deck(); protected  Deck(Parcel in); String getTitle(); String getAuthor(); String getExternalId(); long getDbId(); long getTimestamp(); String getCreationDateString(); String getDeckInformation(); boolean isLocked(); String getSourceLanguageIso(); String getSourceLanguageName(); String getDestinationLanguagesForDisplay(); void setTitle(String title); void setSourceLanguage(String language); void setAuthor(String author); JSONObject toJSON(String exportedDeckName); Map<String, Boolean> getAudioFilePaths(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); static final Creator<Deck> CREATOR; }
@Test public void shouldReturnDestinationLanguagesAsString() throws Exception { Dictionary[] dictionaries = new Dictionary[]{ new Dictionary("English", null, 1L), new Dictionary("Farsi", null, 2L) }; Deck deck = new Deck(NO_VALUE, "author", NO_VALUE, -1, 1454946439262L, false, NO_VALUE, dictionaries); String destinationLanguagesForDisplay = deck.getDestinationLanguagesForDisplay(); assertEquals("ENGLISH FARSI", destinationLanguagesForDisplay); }