@Test public void onSomeSavedStops_shouldHaveSavedStops() { when(settings.getString("saved_stops", "")).thenReturn("1_123,1_456,1_789"); assertThat(subject.getSavedStops()) .isEqualTo( new ArrayList<String>() { { add("1_123"); add("1_456"); add("1_789"); } }); }
@Test public void onNoSavedStops_shouldHaveEmptyList() { when(settings.getString("saved_stops", "")).thenReturn(""); assertThat(subject.getSavedStops().size()).isEqualTo(0); }