public Expectations setBadIssuerExpectations ( LibertyServer server ) throws Exception { Expectations expectations = new Expectations ( ) ; expectations . addExpectation ( new ResponseStatusExpectation ( HttpServletResponse . SC_UNAUTHORIZED ) ) ; expectations . addExpectation ( new ServerMessageExpectation ( server , MpJwtMessageConstants . CWWKS5523E_ERROR_CREATING_JWT_USING_TOKEN_IN_REQ , "Messagelog did not contain an error indicating a problem authenticating the request with the provided token." ) ) ; expectations . addExpectation ( new ServerMessageExpectation ( server , MpJwtMessageConstants . CWWKS6022E_ISSUER_NOT_TRUSTED , "Messagelog did not contain an exception indicating that the issuer is NOT valid." ) ) ; return expectations ; }
Set expectations for tests that have bad issuers