@Test
public void testInit() {

    final Supplier<Boolean> isDirty = () -> true;
    final Supplier<Integer> currentHashCode = () -> 123;
    final Command noResultsFoundCallback = () -> {/* Nothing. */};
    doReturn(isDirty).when(presenter).getIsDirtySupplier();
    doReturn(noResultsFoundCallback).when(presenter).getNoResultsFoundCallback();
    doReturn(currentHashCode).when(presenter).getCurrentHashCodeSupplier();
    presenter.init();
    verify(editorSearchIndex).setNoResultsFoundCallback(noResultsFoundCallback);
    verify(editorSearchIndex).setCurrentAssetHashcodeSupplier(currentHashCode);
    verify(editorSearchIndex, times(2)).registerSubIndex(presenter);
    verify(searchBarComponent, times(2)).init(editorSearchIndex);
    verify(multiPageEditor, times(2)).addTabBarWidget(searchBarComponentWidget);
}