ListCellRenderer<Object> () { if (ApplicationManager.getApplication().isUnitTestMode()) { return (list, value, index, isSelected, cellHasFocus) -> new JPanel(); } ListCellRenderer<Object> renderer = myListFactory.createListRenderer(myListModel, myHeader); if (myMlService != null) { return myMlService.wrapRenderer(renderer, myListModel); } return renderer; }