@Test
public void testIsValidWithSameState() {

	MockHttpServletRequest mockHttpServletRequest =
		new MockHttpServletRequest();
	String state = RandomTestUtil.randomString();
	mockHttpServletRequest.setParameter("state", state);
	OAuth2State oAuth2State = new OAuth2State(
		RandomTestUtil.randomLong(), RandomTestUtil.randomString(),
		RandomTestUtil.randomString(), state);
	Assert.assertTrue(
		OAuth2StateUtil.isValid(oAuth2State, mockHttpServletRequest));
}