### Question:
DMNCardComponent extends BaseCardComponent<DMNIncludedModelActiveRecord, DMNCardComponent.ContentView> { protected void refreshView() { contentView.setPath(getTruncatedSubTitle()); contentView.setDataTypesCount(getDataTypesCount()); contentView.setDrgElementsCount(getDrgElementsCount()); } @Inject  DMNCardComponent(final @DMNCard DMNCardComponent.ContentView contentView,
                            final Event<RefreshDecisionComponents> refreshDecisionComponentsEvent); @PostConstruct void init();  }### Answer:
@Test public void testRefreshView() { final DMNIncludedModelActiveRecord includedModel = mock(DMNIncludedModelActiveRecord.class); final String path = "/bla/bla/bla/111111111111111222222222222222333333333333333444444444444444/file.dmn"; final int dataTypesCount = 12; final int drgElementsCount = 34; when(includedModel.getNamespace()).thenReturn(path); when(includedModel.getDataTypesCount()).thenReturn(dataTypesCount); when(includedModel.getDrgElementsCount()).thenReturn(drgElementsCount); doReturn(includedModel).when(card).getIncludedModel(); card.refreshView(); verify(cardView).setPath("...111111222222222222222333333333333333444444444444444/file.dmn"); verify(cardView).setDataTypesCount(dataTypesCount); verify(cardView).setDrgElementsCount(drgElementsCount); }