TimelineStateHolder { public void finishTimelineRequest() { requestInFlight.set(false); } TimelineStateHolder();   TimelineStateHolder(TimelineCursor nextCursor, TimelineCursor previousCursor); void resetCursors(); Long positionForNext(); Long positionForPrevious(); void setNextCursor(TimelineCursor timelineCursor); void setPreviousCursor(TimelineCursor timelineCursor); void setCursorsIfNull(TimelineCursor timelineCursor); boolean startTimelineRequest(); void finishTimelineRequest(); final AtomicBoolean requestInFlight; }
@Test public void testFinishTimelineRequest() { final TimelineStateHolder holder = new TimelineStateHolder(); holder.requestInFlight.set(true); holder.finishTimelineRequest(); assertFalse(holder.requestInFlight.get()); }