@Test void createInstance() { assertNull(testSubject.createInstance(method, method.getParameters(), 0)); ParameterResolver<?> resolver = testSubject.createInstance(method, method.getParameters(), 1); assertNotNull(resolver); GenericEventMessage<String> message = new GenericEventMessage<>("test"); assertFalse(resolver.matches(message)); GlobalSequenceTrackingToken trackingToken = new GlobalSequenceTrackingToken(1L); GenericTrackedEventMessage<String> trackedEventMessage = new GenericTrackedEventMessage<>(trackingToken, message); assertTrue(resolver.matches(trackedEventMessage)); assertSame(trackingToken, resolver.resolveParameterValue(trackedEventMessage)); }
@Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { if (TrackingToken.class.equals(parameters[parameterIndex].getType())) { return RESOLVER; } return null; }
TrackingTokenParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { if (TrackingToken.class.equals(parameters[parameterIndex].getType())) { return RESOLVER; } return null; } }
TrackingTokenParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { if (TrackingToken.class.equals(parameters[parameterIndex].getType())) { return RESOLVER; } return null; }  }
TrackingTokenParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { if (TrackingToken.class.equals(parameters[parameterIndex].getType())) { return RESOLVER; } return null; }  @Override ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex); }
TrackingTokenParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { if (TrackingToken.class.equals(parameters[parameterIndex].getType())) { return RESOLVER; } return null; }  @Override ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex);  }