@Test public void addInterceptorsWithCustomPathMatcher() { PathMatcher pathMatcher = Mockito.mock(PathMatcher.class); this.registry.addInterceptor(interceptor1).addPathPatterns("/path1/**").pathMatcher(pathMatcher); MappedInterceptor mappedInterceptor = (MappedInterceptor) this.registry.getInterceptors().get(0); assertSame(pathMatcher, mappedInterceptor.getPathMatcher()); }