@Test public void testNewWithDraw() { Club club = Club.builder().id(0).name("Sample").build(); ClubStats stats = club.newWithDraw().stats(); assertThat(stats.points()).isEqualTo(1); assertThat(stats.goals()).isEqualTo(0); assertThat(stats.losses()).isEqualTo(0); assertThat(stats.draws()).isEqualTo(1); assertThat(stats.wins()).isEqualTo(0); }
public Club newWithDraw() { return toBuilder() .stats(nonNullStats().newWithDraw()) .build(); }
Club extends Model implements Persistable { public Club newWithDraw() { return toBuilder() .stats(nonNullStats().newWithDraw()) .build(); } }
Club extends Model implements Persistable { public Club newWithDraw() { return toBuilder() .stats(nonNullStats().newWithDraw()) .build(); }  }
Club extends Model implements Persistable { public Club newWithDraw() { return toBuilder() .stats(nonNullStats().newWithDraw()) .build(); }  abstract String name(); abstract String small_image(); abstract String large_image(); abstract int league_id(); @Nullable abstract String abbrev_name(); @ColumnAdapter(ClubStats.Adapter.class) @Nullable abstract ClubStats stats(); static Club create(Cursor cursor); abstract ContentValues toContentValues(); @Override String toString(); List<? extends Player> substitutes(ClubDataStore dataStore); void replacePlayer(Player oldPlayer, Player newPlayer, ClubDataStore dataStore); static Builder builder(); static Club create(int id, String name); String tinyName(); abstract Builder toBuilder(); Club newWithWin(int goalsDifferential); boolean nameEquals(Club otherTeam); Club newWithDraw(); Club newWithLoss(int goalsDifferential); @NonNull ClubStats nonNullStats(); String shortName(); static JsonAdapter<Club> jsonAdapter(Moshi moshi); @Override int describeContents(); }
Club extends Model implements Persistable { public Club newWithDraw() { return toBuilder() .stats(nonNullStats().newWithDraw()) .build(); }  abstract String name(); abstract String small_image(); abstract String large_image(); abstract int league_id(); @Nullable abstract String abbrev_name(); @ColumnAdapter(ClubStats.Adapter.class) @Nullable abstract ClubStats stats(); static Club create(Cursor cursor); abstract ContentValues toContentValues(); @Override String toString(); List<? extends Player> substitutes(ClubDataStore dataStore); void replacePlayer(Player oldPlayer, Player newPlayer, ClubDataStore dataStore); static Builder builder(); static Club create(int id, String name); String tinyName(); abstract Builder toBuilder(); Club newWithWin(int goalsDifferential); boolean nameEquals(Club otherTeam); Club newWithDraw(); Club newWithLoss(int goalsDifferential); @NonNull ClubStats nonNullStats(); String shortName(); static JsonAdapter<Club> jsonAdapter(Moshi moshi); @Override int describeContents();  }