public void execute() {
    if (indexesAreEnabled()) {
      stream(indexers)
        .forEach(this::indexUninitializedTypes);
    }
  }
@Test
  public void index_if_not_initialized() {
    doReturn(false).when(metadataIndex).getInitialized(TYPE_FAKE);

    underTest.execute();

    verify(indexer).getIndexTypes();
    verify(indexer).indexOnStartup(Mockito.eq(ImmutableSet.of(TYPE_FAKE)));
  }