OAuth2StateUtil { public static void cleanUp(HttpServletRequest httpServletRequest) { HttpSession httpSession = httpServletRequest.getSession(); httpSession.removeAttribute( _SESSION_ATTRIBUTE_NAME_GOOGLE_OAUTH2_STATE); }  static void cleanUp(HttpServletRequest httpServletRequest); static Optional<OAuth2State> getOAuth2StateOptional(
		HttpServletRequest httpServletRequest); static String getRedirectURI(String portalURL); static boolean isValid(
		OAuth2State oAuth2State, HttpServletRequest httpServletRequest); static void save(
		HttpServletRequest httpServletRequest, OAuth2State oAuth2State);  }
@Test public void testCleanUp() { MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest(); OAuth2StateUtil.save( mockHttpServletRequest, new OAuth2State( RandomTestUtil.randomLong(), RandomTestUtil.randomString(), RandomTestUtil.randomString(), RandomTestUtil.randomString())); OAuth2StateUtil.cleanUp(mockHttpServletRequest); Optional<OAuth2State> oAuth2StateOptional = OAuth2StateUtil.getOAuth2StateOptional(mockHttpServletRequest); Assert.assertFalse(oAuth2StateOptional.isPresent()); }