AnalysisScreenPresenter extends AnalysisScreenContract.Presenter { @VisibleForTesting GiniVisionMultiPageDocument< GiniVisionDocument, GiniVisionDocumentError> getMultiPageDocument() { return mMultiPageDocument; } AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage); @VisibleForTesting  AnalysisScreenPresenter(
            @NonNull final Activity activity,
            @NonNull final AnalysisScreenContract.View view,
            @NonNull final Document document,
            @Nullable final String documentAnalysisErrorMessage,
            @NonNull final AnalysisInteractor analysisInteractor); @Override void hideError(); @Override void onNoExtractionsFound(); @Override void onDocumentAnalyzed(); @Override void showError(@NonNull final String message, final int duration); @Override void showError(@NonNull final String message, @NonNull final String buttonTitle,
            @NonNull final View.OnClickListener onClickListener); @Override void startScanAnimation(); @Override void stopScanAnimation(); @Override void setListener(@NonNull final AnalysisFragmentListener listener); @Override void start(); @Override void stop();  }
@Test public void should_convertSinglePageDocument_intoMultiPage() throws Exception { final GiniVisionDocument document = DocumentFactory.newEmptyImageDocument( Document.Source.newCameraSource(), Document.ImportMethod.NONE); final AnalysisScreenPresenter presenter = createPresenter(document); final GiniVisionDocument documentInMultiPage = presenter.getMultiPageDocument().getDocuments().get(0); assertThat(documentInMultiPage).isEqualTo(document); }
@Test public void should_tagDocuments_forParcelableMemoryCache() throws Exception { final GiniVisionDocument document = DocumentFactory.newEmptyImageDocument( Document.Source.newCameraSource(), Document.ImportMethod.NONE); final AnalysisScreenPresenter presenter = createPresenter(document); assertThat(document.getParcelableMemoryCacheTag()) .isEqualTo(AnalysisScreenPresenter.PARCELABLE_MEMORY_CACHE_TAG); assertThat(presenter.getMultiPageDocument().getParcelableMemoryCacheTag()) .isEqualTo(AnalysisScreenPresenter.PARCELABLE_MEMORY_CACHE_TAG); }