ItemUiMap { public boolean containsItemUi( String id ) { checkArgument( id != null, ID_MUST_NOT_BE_NULL ); return itemUis.containsKey( id ); } ItemUiMap( Timeline<T> timeline, ItemUiFactory<T, U> itemUiFactory ); boolean containsItemUi( String id ); ItemUi<T> findByItemId( String id ); boolean isTimelineEmpty(); void fetch( FetchOperation operation ); void update( U uiContext );  }
@Test public void containsItemUi() { itemUiMap.update( uiContext ); boolean actual = itemUiMap.containsItemUi( item.getId() ); assertThat( actual ).isTrue(); }
@Test public void containsItemUiForUnknownItem() { boolean actual = itemUiMap.containsItemUi( item.getId() ); assertThat( actual ).isFalse(); }
@Test public void containsItemUiWithNullAsId() { Throwable actual = thrownBy( () -> itemUiMap.containsItemUi( null ) ); assertThat( actual ) .hasMessageContaining( ID_MUST_NOT_BE_NULL ) .isInstanceOf( IllegalArgumentException.class ); }