### Question:
TimeSum { public void substract(int hoursToSubstract, int minutesToSubstract) { if (hoursToSubstract < 0 || minutesToSubstract < 0) { throw new IllegalArgumentException("both values have to be >= 0"); } hours -= hoursToSubstract; minutes -= minutesToSubstract; balance(); }  void set(int hours, int minutes); void add(int hoursToAdd, int minutesToAdd); void substract(int hoursToSubstract, int minutesToSubstract); void addOrSubstract(TimeSum timeSum); @Override String toString(); int getAsMinutes(); void reset();  }### Answer:
@Test public void substract() { set(4, 20); subtract(0, 140); assertTime("2:00"); subtract(1, 75); assertTime("-0:15"); subtract(1, 50); assertTime("-2:05"); }