@Test public void testGetDummyProcessor() throws Exception { JsonCapabilities firefoxCaps = buildJsonCapabilities(firefox()); assertThat(factory.getProcessor(firefoxCaps), is(instanceOf(DummyCapabilityProcessor.class))); }
public CapabilityProcessor getProcessor(JsonCapabilities caps) { return processors.stream() .filter(p -> p.accept(caps)) .findFirst() .orElse(new DummyCapabilityProcessor()); }
CapabilityProcessorFactory { public CapabilityProcessor getProcessor(JsonCapabilities caps) { return processors.stream() .filter(p -> p.accept(caps)) .findFirst() .orElse(new DummyCapabilityProcessor()); } }
CapabilityProcessorFactory { public CapabilityProcessor getProcessor(JsonCapabilities caps) { return processors.stream() .filter(p -> p.accept(caps)) .findFirst() .orElse(new DummyCapabilityProcessor()); }  }
CapabilityProcessorFactory { public CapabilityProcessor getProcessor(JsonCapabilities caps) { return processors.stream() .filter(p -> p.accept(caps)) .findFirst() .orElse(new DummyCapabilityProcessor()); }  CapabilityProcessor getProcessor(JsonCapabilities caps); }
CapabilityProcessorFactory { public CapabilityProcessor getProcessor(JsonCapabilities caps) { return processors.stream() .filter(p -> p.accept(caps)) .findFirst() .orElse(new DummyCapabilityProcessor()); }  CapabilityProcessor getProcessor(JsonCapabilities caps);  }