### Question:
CardFrameComponent { public void refreshView() { getView().setupToggleTitle(isToggleTitleEnabled()); getView().setUUID(getCard().getUUID()); getView().setIcon(getCard().getIcon().getCssName()); getView().setTitle(getCard().getTitle()); getView().setContent(getCard().getContent()); getView().enableReadOnlyMode(); } @Inject  CardFrameComponent(final View view); void initialize(final CardsGridComponent grid,
                           final CardComponent card); HTMLElement getElement(); void refreshView(); void enableEditMode(); void enableReadOnlyMode(); View getView();  }### Answer:
@Test public void testRefreshView() { final CardComponent card = mock(CardComponent.class); final Style.HasCssName icon = mock(Style.HasCssName.class); final HTMLElement content = mock(HTMLElement.class); final String uuid = "uuid"; final String title = "title"; final String iconCSSClass = "icon-css-class"; doReturn(card).when(cardFrame).getCard(); when(icon.getCssName()).thenReturn(iconCSSClass); when(card.getUUID()).thenReturn(uuid); when(card.getIcon()).thenReturn(icon); when(card.getTitle()).thenReturn(title); when(card.getContent()).thenReturn(content); cardFrame.refreshView(); verify(view).setupToggleTitle(true); verify(view).setUUID(uuid); verify(view).setIcon(iconCSSClass); verify(view).setTitle(title); verify(view).setContent(content); verify(view).enableReadOnlyMode(); }