@Test public void testMatch() { EventProcessorIdentifier id = new EventProcessorIdentifier("processorName", "tokenStore"); SameProcessor testSubject = new SameProcessor("context", id); ClientProcessor clientProcessor = new FakeClientProcessor("not-important", false, "context", EventProcessorInfo.newBuilder() .setProcessorName( "processorName") .setTokenStoreIdentifier( "tokenStore") .build()); assertTrue(testSubject.test(clientProcessor)); }
@Override public boolean test(ClientProcessor processor) { EventProcessorInfo i = processor.eventProcessorInfo(); EventProcessorIdentifier id = new EventProcessorIdentifier(i.getProcessorName(), i.getTokenStoreIdentifier()); return processor.belongsToContext(context) && id.equals(eventProcessorIdentifier); }
SameProcessor implements Predicate<ClientProcessor> { @Override public boolean test(ClientProcessor processor) { EventProcessorInfo i = processor.eventProcessorInfo(); EventProcessorIdentifier id = new EventProcessorIdentifier(i.getProcessorName(), i.getTokenStoreIdentifier()); return processor.belongsToContext(context) && id.equals(eventProcessorIdentifier); } }
SameProcessor implements Predicate<ClientProcessor> { @Override public boolean test(ClientProcessor processor) { EventProcessorInfo i = processor.eventProcessorInfo(); EventProcessorIdentifier id = new EventProcessorIdentifier(i.getProcessorName(), i.getTokenStoreIdentifier()); return processor.belongsToContext(context) && id.equals(eventProcessorIdentifier); } SameProcessor(TrackingEventProcessor processor);  SameProcessor(String context, ClientProcessor clientProcessor);  SameProcessor(String context, EventProcessorIdentifier eventProcessorIdentifier); }
SameProcessor implements Predicate<ClientProcessor> { @Override public boolean test(ClientProcessor processor) { EventProcessorInfo i = processor.eventProcessorInfo(); EventProcessorIdentifier id = new EventProcessorIdentifier(i.getProcessorName(), i.getTokenStoreIdentifier()); return processor.belongsToContext(context) && id.equals(eventProcessorIdentifier); } SameProcessor(TrackingEventProcessor processor);  SameProcessor(String context, ClientProcessor clientProcessor);  SameProcessor(String context, EventProcessorIdentifier eventProcessorIdentifier); @Override boolean test(ClientProcessor processor); }
SameProcessor implements Predicate<ClientProcessor> { @Override public boolean test(ClientProcessor processor) { EventProcessorInfo i = processor.eventProcessorInfo(); EventProcessorIdentifier id = new EventProcessorIdentifier(i.getProcessorName(), i.getTokenStoreIdentifier()); return processor.belongsToContext(context) && id.equals(eventProcessorIdentifier); } SameProcessor(TrackingEventProcessor processor);  SameProcessor(String context, ClientProcessor clientProcessor);  SameProcessor(String context, EventProcessorIdentifier eventProcessorIdentifier); @Override boolean test(ClientProcessor processor);  }