DockerRegistryPlugin extends AbstractEC2InstancePlugin { @Override protected Predicate<? super String> supportsEventName() { return isEqual(RUN_INSTANCES).or(isEqual(START_INSTANCES)); } DockerRegistryPlugin(final EC2InstanceContextProvider contextProvider, final ViolationSink violationSink);   }
@Test public void testSupportsEventName() throws Exception { assertThat(plugin.supportsEventName().test("RunInstances")).isTrue(); assertThat(plugin.supportsEventName().test("StartInstances")).isTrue(); assertThat(plugin.supportsEventName().test("TerminateInstances")).isFalse(); assertThat(plugin.supportsEventName().test("StopInstances")).isFalse(); assertThat(plugin.supportsEventName().test("Foobar")).isFalse(); }