### Question:
AttributesManagerArgumentResolver implements ArgumentResolver { @Override public Optional<Object> resolve(ArgumentResolverContext context) { if (context.parameterTypeEquals(AttributesManager.class)) { return Optional.of(context.getHandlerInput().getAttributesManager()); } return Optional.empty(); }  @Override Optional<Object> resolve(ArgumentResolverContext context);  }### Answer:
@Test public void testSupportAndResolve() throws NoSuchMethodException { MethodParameter methodParameter = new MethodParameter( this.getClass().getMethod("testSupportAndResolve"), 0, AttributesManager.class, MethodParameter.EMPTY_ANNOTATIONS ); RequestEnvelope envelope = Utils.buildSimpleEnvelope("intent"); HandlerInput handlerInput = HandlerInput .builder() .withRequestEnvelope(envelope) .build(); ArgumentResolverContext input = new ArgumentResolverContext(mockSkillContext, methodParameter, handlerInput); assertSame(handlerInput.getAttributesManager(), resolver.resolve(input).get()); }
@Test public void testDoesntSupport() throws NoSuchMethodException { MethodParameter methodParameter = new MethodParameter( this.getClass().getMethod("testSupportAndResolve"), 0, Object.class, MethodParameter.EMPTY_ANNOTATIONS ); RequestEnvelope envelope = Utils.buildSimpleEnvelope("intent"); ArgumentResolverContext input = new ArgumentResolverContext(mockSkillContext, methodParameter, HandlerInput.builder().withRequestEnvelope(envelope).build()); assertFalse(resolver.resolve(input).isPresent()); }