Injector injector = new ModulesBuilder().add(
new IndexSettingsModule(new Index("test"), ImmutableSettings.Builder.EMPTY_SETTINGS),
new IndexNameModule(new Index("test")),
new IndexQueryParserModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
new AnalysisModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
new SimilarityModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
new ScriptModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
new SettingsModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
new IndexEngineModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
new IndexCacheModule(ImmutableSettings.Builder.EMPTY_SETTINGS)
).createInjector();