ProjectionTypeArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return !Objects.isNull(parameter.getParameterAnnotation(ProjectionType.class)); } @Autowired  ProjectionTypeArgumentResolver(ProjectionService projectionService, ProjectBoardConfigurationProperties properties); @Override boolean supportsParameter(MethodParameter parameter); @Override Class<?> resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory);  }
@Test public void supportsParameterReturnsTrueWhenAnnotationPresent() { given(methodParameterMock.getParameterAnnotation(ProjectionType.class)).willReturn(projectionTypeMock); assertThat(argumentResolver.supportsParameter(methodParameterMock)).isTrue(); }
@Test public void supportsParameterReturnsFalseWhenNotAnnotated() { given(methodParameterMock.getParameterAnnotation(ProjectionType.class)).willReturn(null); assertThat(argumentResolver.supportsParameter(methodParameterMock)).isFalse(); }