### Question:
EnsureOakIndex implements AppliableEnsureOakIndex { @Override public List<String> getIgnoreProperties() { return this.ignoreProperties; }  @Override final void apply(boolean force); @Override final boolean isApplied(); @Override boolean isImmediate(); @Override List<String> getIgnoreProperties(); @Override final String getEnsureDefinitionsPath(); @Override String getOakIndexesPath(); final String toString(); @Property(label = "Ensure Definitions Path",
            description = "The absolute path to the resource containing the "
                    + "ACS AEM Commons ensure definitions",
            value = DEFAULT_ENSURE_DEFINITIONS_PATH)
    static final String PROP_ENSURE_DEFINITIONS_PATH; @Property(label = "Oak Indexes Path",
            description = "The absolute path to the oak:index to update; Defaults to [ /oak:index ]",
            value = DEFAULT_OAK_INDEXES_PATH)
    static final String PROP_OAK_INDEXES_PATH; @Property(
            label = "Immediate",
            description = "Apply the indexes on startup of service. Defaults to [ true ]",
            boolValue = DEFAULT_IMMEDIATE
    )
    static final String PROP_IMMEDIATE; @Property(label = "Additional ignore properties",
            description = "Property names that are to be ignored when determining if an oak index has changed, as well as what properties should be removed/updated.",
            cardinality = Integer.MAX_VALUE,
            value = {})
    static final String PROP_ADDITIONAL_IGNORE_PROPERTIES; }### Answer:
@Test public void testWithLocalIgnoredProperties() throws NotCompliantMBeanException { setupIndexManager(new String[] {}); ensureOakIndexProperties.put(EnsureOakIndex.PROP_ADDITIONAL_IGNORE_PROPERTIES, new String[] {"localProp"}); ensureOakIndexProperties.put(EnsureOakIndex.PROP_IMMEDIATE, false); context.registerInjectActivateService(eoi, ensureOakIndexProperties); List<String> ignoreProperties = eoi.getIgnoreProperties(); assertTrue(ignoreProperties.size() == 1); assertTrue(ignoreProperties.contains("localProp")); }
@Test public void testLegacyMode() throws NotCompliantMBeanException { setupIndexManager(new String[] {"globalSetting"}); ensureOakIndexProperties.put(EnsureOakIndex.PROP_IMMEDIATE, false); context.registerInjectActivateService(eoi, ensureOakIndexProperties); List<String> ignoreProperties = eoi.getIgnoreProperties(); assertTrue(ignoreProperties.size() == 1); assertTrue(ignoreProperties.contains("globalSetting")); }
@Test public void testMixedMode() throws NotCompliantMBeanException { setupIndexManager(new String[] {"globalSetting"}); ensureOakIndexProperties.put(EnsureOakIndex.PROP_ADDITIONAL_IGNORE_PROPERTIES, new String[] {"localProp"}); ensureOakIndexProperties.put(EnsureOakIndex.PROP_IMMEDIATE, false); context.registerInjectActivateService(eoi, ensureOakIndexProperties); List<String> ignoreProperties = eoi.getIgnoreProperties(); assertTrue(ignoreProperties.size() == 1); assertTrue(ignoreProperties.contains("localProp")); }