@Test public void testSupportAndResolve() throws NoSuchMethodException { MethodParameter methodParameter = new MethodParameter( this.getClass().getMethod("testSupportAndResolve"), 0, Session.class, MethodParameter.EMPTY_ANNOTATIONS ); RequestEnvelope envelope = Utils.buildSimpleEnvelope("intent"); ArgumentResolverContext input = new ArgumentResolverContext(mockSkillContext, methodParameter, HandlerInput.builder().withRequestEnvelope(envelope).build()); assertSame(envelope.getSession(), resolver.resolve(input).get()); }
@Override public Optional<Object> resolve(ArgumentResolverContext input) { if (input.parameterTypeEquals(Session.class)) { return Optional.of(input.getHandlerInput().getRequestEnvelope().getSession()); } return Optional.empty(); }
SessionArgumentResolver implements ArgumentResolver { @Override public Optional<Object> resolve(ArgumentResolverContext input) { if (input.parameterTypeEquals(Session.class)) { return Optional.of(input.getHandlerInput().getRequestEnvelope().getSession()); } return Optional.empty(); } }
SessionArgumentResolver implements ArgumentResolver { @Override public Optional<Object> resolve(ArgumentResolverContext input) { if (input.parameterTypeEquals(Session.class)) { return Optional.of(input.getHandlerInput().getRequestEnvelope().getSession()); } return Optional.empty(); }  }
SessionArgumentResolver implements ArgumentResolver { @Override public Optional<Object> resolve(ArgumentResolverContext input) { if (input.parameterTypeEquals(Session.class)) { return Optional.of(input.getHandlerInput().getRequestEnvelope().getSession()); } return Optional.empty(); }  @Override Optional<Object> resolve(ArgumentResolverContext input); }
SessionArgumentResolver implements ArgumentResolver { @Override public Optional<Object> resolve(ArgumentResolverContext input) { if (input.parameterTypeEquals(Session.class)) { return Optional.of(input.getHandlerInput().getRequestEnvelope().getSession()); } return Optional.empty(); }  @Override Optional<Object> resolve(ArgumentResolverContext input);  }