MediaFileReader { int getIndexOfFirstToDisplay() { if (mediaList.isEmpty()) { return -1; } return firstMediaDisplayedIndex.getValue(); } MediaFileReader(IGameContext gameContext); void setPlayingMediaIndex(int newIndex); void next(); File getMediaPlayerDirectory();  }
@Test void shouldReturnMinusOneWhenThereIsNoMediaToDisplay() { MediaFileReader mfr = new MediaFileReader(mockGameContext) { @Override public File getMediaPlayerDirectory() { return testDir; } }; assertEquals(mfr.getMediaList().size(), 0); assertEquals(mfr.getIndexOfFirstToDisplay(), -1); }