ItemUiMap { public void update( U uiContext ) { checkArgument( uiContext != null, UI_CONTEXT_MUST_NOT_BE_NULL ); timeline.getItems().forEach( item -> doUpdate( uiContext, item ) ); } 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 updateWithNullAsUiContext() { Throwable actual = thrownBy( () -> itemUiMap.update( null ) ); assertThat( actual ) .hasMessageContaining( UI_CONTEXT_MUST_NOT_BE_NULL ) .isInstanceOf( IllegalArgumentException.class ); }