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