An example:
private HttpServletRequest request = mock(HttpServletRequest.class);
private HttpServletResponse response = mock(HttpServletResponse.class);
@Test
public void testAuthz() throws Exception {
AuthorizationEndpoint endpoint = new AuthorizationEndpoint();
when(request.getParameter("response_type")).thenReturn(ResponseType.CODE.toString());
when(request.getParameter("client_id")).thenReturn("test_id");
when(request.getParameter("redirect_uri")).thenReturn("http://localhost");
final ArrayList
values = new ArrayList();
doAnswer(new Answer
No comments:
Post a Comment