SimpleSnifferIdIndexNameStrategy implements IndexNamingStrategy { @Override public String[] getRetrievalNames(final long snifferId) { if (applyLegacyIndexName) { return new String[] { buildActiveName(snifferId), legacyIndexName }; } else { return new String[] { buildActiveName(snifferId) }; } }  @PostConstruct void init(); @Override String buildActiveName(final long snifferId); @Override String[] getRetrievalNames(final long snifferId);  }
@Test public void testRetrievalWithoutLegacy() { Assert.assertEquals(2, strategy.getRetrievalNames(123).length); Assert.assertEquals(indexNamePrefix + 123, strategy.getRetrievalNames(123)[0]); Assert.assertEquals("lf", strategy.getRetrievalNames(123)[1]); }