### Question:
SmartOpenIdController extends DelegateController implements Serializable { @Override public boolean canHandle(final HttpServletRequest request, final HttpServletResponse response) { final String openIdMode = request.getParameter(OpenIdConstants.OPENID_MODE); if (StringUtils.equals(openIdMode, OpenIdConstants.ASSOCIATE)) { logger.info("Handling request. openid.mode : {}", openIdMode); return true; } logger.info("Cannot handle request. openid.mode : {}", openIdMode); return false; }  Map<String, String> getAssociationResponse(final HttpServletRequest request); @Override boolean canHandle(final HttpServletRequest request, final HttpServletResponse response); void setSuccessView(final String successView); void setFailureView(final String failureView); @NotNull void setServerManager(final ServerManager serverManager);  }### Answer:
@Test public void verifyCanHandle() { request.addParameter("openid.mode", "associate"); final boolean canHandle = smartOpenIdController.canHandle(request, response); request.removeParameter("openid.mode"); assertEquals(true, canHandle); }
@Test public void verifyCannotHandle() { request.addParameter("openid.mode", "anythingElse"); final boolean canHandle = smartOpenIdController.canHandle(request, response); request.removeParameter("openid.mode"); assertEquals(false, canHandle); }