@Test void testToString() { assertThat(this.track.toString(), equalTo(NAME + " from: Dieter, Hans, ")); this.track = new TrackEntity(); assertThat(this.track.toString(), equalTo("No song data available")); }
@Override public String toString() { if (this.artists != null && getName() != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder = stringBuilder.append(getName()).append(" from: "); for (String name : this.artists) { stringBuilder = stringBuilder.append(name).append(", "); } return stringBuilder.toString(); } return "No song data available"; }
TrackEntity extends Item { @Override public String toString() { if (this.artists != null && getName() != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder = stringBuilder.append(getName()).append(" from: "); for (String name : this.artists) { stringBuilder = stringBuilder.append(name).append(", "); } return stringBuilder.toString(); } return "No song data available"; } }
TrackEntity extends Item { @Override public String toString() { if (this.artists != null && getName() != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder = stringBuilder.append(getName()).append(" from: "); for (String name : this.artists) { stringBuilder = stringBuilder.append(name).append(", "); } return stringBuilder.toString(); } return "No song data available"; }  }
TrackEntity extends Item { @Override public String toString() { if (this.artists != null && getName() != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder = stringBuilder.append(getName()).append(" from: "); for (String name : this.artists) { stringBuilder = stringBuilder.append(name).append(", "); } return stringBuilder.toString(); } return "No song data available"; }  String[] getArtists(); void setArtists(String[] artists); int getDurationInMs(); void setDurationInMs(int duration); @Override String toString(); }
TrackEntity extends Item { @Override public String toString() { if (this.artists != null && getName() != null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder = stringBuilder.append(getName()).append(" from: "); for (String name : this.artists) { stringBuilder = stringBuilder.append(name).append(", "); } return stringBuilder.toString(); } return "No song data available"; }  String[] getArtists(); void setArtists(String[] artists); int getDurationInMs(); void setDurationInMs(int duration); @Override String toString();  }