### Question:
RemoteResult { public boolean isPresent() { return mType == Type.SUCCESS; } private  RemoteResult(@Type int type, long value); static RemoteResult of(long value); boolean isPresent(); long get(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final RemoteResult FAILED_TIMED_OUT; static final RemoteResult FAILED_CANCELLED; static final RemoteResult FAILED_THREAD_INTERRUPTED; }### Answer:
@Test public void testIsPresent_whenTimeOutResult_returnsFalse() { boolean timeOutIsPresent = RemoteResult.FAILED_TIMED_OUT.isPresent(); assertThat(timeOutIsPresent).isFalse(); }
@Test public void testIsPresent_whenCancelledResult_returnsFalse() { boolean cancelledIsPresent = RemoteResult.FAILED_CANCELLED.isPresent(); assertThat(cancelledIsPresent).isFalse(); }
@Test public void testIsPresent_whenThreadInterruptedResult_returnsFalse() { boolean threadInterruptedIsPresent = RemoteResult.FAILED_THREAD_INTERRUPTED.isPresent(); assertThat(threadInterruptedIsPresent).isFalse(); }