### Question:
DocumentPreview implements DocumentPreviewView.Presenter,
                                        IsElement { public void setState(DocumentPreviewState state) { this.state = state; initState(); } @Inject  DocumentPreview(DocumentPreviewView view, TranslationService translationService); void init(DocumentData documentData); @Override String getDocumentLink(); @Override String getDocumentName(); void setState(DocumentPreviewState state); DocumentData getDocumentData(); @Override HTMLElement getElement(); void setEnabled(boolean enabled); void setStateHandler(DocumentPreviewStateActionsHandler handler);  }### Answer:
@Test public void testNotifyStateChange() { testSetStateHandler(); preview.setState(DocumentPreviewState.UPLOADED); verify(handler, times(2)).getCurrentStateActions(); verify(view, times(2)).setState(any(), anyList()); }
@Test public void setSetStateDisabled() { testDisable(); preview.setState(DocumentPreviewState.STORED); verify(handler, times(1)).getCurrentStateActions(); verify(view, times(2)).setState(any(), anyList()); }