@Test public void shouldDoNothingOnContextSave() throws Exception { BearerSecurityContextRepository repository = new BearerSecurityContextRepository(); SecurityContext context = mock(SecurityContext.class); HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse response = mock(HttpServletResponse.class); verifyNoMoreInteractions(context, request, response); repository.saveContext(context, request, response); }
@Override public void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response) { }
BearerSecurityContextRepository implements SecurityContextRepository { @Override public void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response) { } }
BearerSecurityContextRepository implements SecurityContextRepository { @Override public void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response) { }  }
BearerSecurityContextRepository implements SecurityContextRepository { @Override public void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response) { }  @Override SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder); @Override void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response); @Override boolean containsContext(HttpServletRequest request); }
BearerSecurityContextRepository implements SecurityContextRepository { @Override public void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response) { }  @Override SecurityContext loadContext(HttpRequestResponseHolder requestResponseHolder); @Override void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response); @Override boolean containsContext(HttpServletRequest request);  }