Timepoint implements Parcelable, Comparable<Timepoint> { public boolean isPM() { return !isAM(); } Timepoint(Timepoint time);  Timepoint(@IntRange(from=0, to=23) int hour,
                     @IntRange(from=0, to=59) int minute,
                     @IntRange(from=0, to=59) int second);  Timepoint(@IntRange(from=0, to=23) int hour,
                     @IntRange(from=0, to=59) int minute);  Timepoint(@IntRange(from=0, to=23) int hour);  Timepoint(Parcel in); @IntRange(from=0, to=23) int getHour(); @IntRange(from=0, to=59) int getMinute(); @IntRange(from=0, to=59) int getSecond(); boolean isAM(); boolean isPM(); void setAM(); void setPM(); void add(TYPE type, int value); int get(@NonNull TYPE type); int toSeconds(); @Override int hashCode(); @Override boolean equals(Object o); boolean equals(@Nullable Timepoint time, @NonNull TYPE resolution); @Override int compareTo(@NonNull Timepoint t); @Override void writeToParcel(Parcel out, int flags); @Override int describeContents(); @Override String toString(); static final Parcelable.Creator<Timepoint> CREATOR; }
@Test public void isPMShouldReturnFalseIfTimepointIsBeforeMidday() { Timepoint timepoint = new Timepoint(11); Assert.assertFalse(timepoint.isPM()); }
@Test public void isPMShouldReturnTrueIfTimepointIsMidday() { Timepoint timepoint = new Timepoint(12); Assert.assertTrue(timepoint.isPM()); }
@Test public void isPMShouldReturnTrueIfTimepointIsAfterMidday() { Timepoint timepoint = new Timepoint(13); Assert.assertTrue(timepoint.isPM()); }
@Test public void isPMShouldReturnFalseIfTimepointIsMidnight() { Timepoint timepoint = new Timepoint(0); Assert.assertFalse(timepoint.isPM()); }