Buggy code:
public class OAuth2ServiceAuthCodeGrantOpenIdTestCase extends OAuth2ServiceAbstractIntegrationTest { private ServerConfigurationManager serverConfigurationManager ; private Oauth2TokenValidationClient oAuth2TokenValidationClient ; private AuthenticatorClient logManger ; private File identityXML ; private String adminUsername ; private String adminPassword ; private String accessToken ; private String sessionDataKeyConsent ; private String sessionDataKey ; private String authorizationCode ; private String consumerKey ; private String consumerSecret ; private DefaultHttpClient client ; private Tomcat tomcat ; @ BeforeClass ( alwaysRun = true ) public void testInit ( ) throws Exception { } @ AfterClass ( alwaysRun = true ) public void atEnd ( ) throws Exception { } @ Test ( alwaysRun = true , description = "Deploy<seq2seq4repair_space>playground<seq2seq4repair_space>application" ) public void testDeployPlaygroundApp ( ) { } @ Test ( groups = "wso2.is" , description = "Check<seq2seq4repair_space>Oauth2<seq2seq4repair_space>application<seq2seq4repair_space>registration" , dependsOnMethods = "testDeployPlaygroundApp" ) public void testRegisterApplication ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Send<seq2seq4repair_space>authorize<seq2seq4repair_space>user<seq2seq4repair_space>request" , dependsOnMethods = "testRegisterApplication" ) public void testSendAuthorozedPost ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Send<seq2seq4repair_space>login<seq2seq4repair_space>post<seq2seq4repair_space>request" , dependsOnMethods = "testSendAuthorozedPost" ) public void testSendLoginPost ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Send<seq2seq4repair_space>approval<seq2seq4repair_space>post<seq2seq4repair_space>request" , dependsOnMethods = "testSendLoginPost" ) public void testSendApprovalPost ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Get<seq2seq4repair_space>access<seq2seq4repair_space>token" , dependsOnMethods = "testSendApprovalPost" ) public void testGetAccessToken ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Validate<seq2seq4repair_space>access<seq2seq4repair_space>token" , dependsOnMethods = "testGetAccessToken" ) public void testValidateAccessToken ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Validate<seq2seq4repair_space>Token<seq2seq4repair_space>Expiration<seq2seq4repair_space>Time" , dependsOnMethods = "testValidateAccessToken" ) public void testValidateTokenExpirationTime ( ) throws Exception { } @ Test ( groups = "wso2.is" , description = "Validate<seq2seq4repair_space>Authorization<seq2seq4repair_space>Context<seq2seq4repair_space>of<seq2seq4repair_space>jwt<seq2seq4repair_space>Token" , dependsOnMethods = "testGetAccessToken" ) public void AuthorizationContextValidateJwtToken ( ) throws Exception { String [ ] claimURI = new String [ ] { OAuth2Constant . WSO2_CLAIM_DIALECT_ROLE } ; OAuth2TokenValidationRequestDTO requestDTO = new OAuth2TokenValidationRequestDTO ( ) ; OAuth2TokenValidationRequestDTO_OAuth2AccessToken accessTokenDTO = new OAuth2TokenValidationRequestDTO_OAuth2AccessToken ( ) ; accessTokenDTO . setIdentifier ( accessToken ) ; accessTokenDTO . setTokenType ( "bearer" ) ; requestDTO . setAccessToken ( accessTokenDTO ) ; requestDTO . setRequiredClaimURIs ( claimURI ) ; OAuth2TokenValidationResponseDTO responseDTO = oAuth2TokenValidationClient . validateToken ( requestDTO ) ; if ( ( responseDTO != null ) && ( ( responseDTO . getAuthorizationContextToken ( ) ) != null ) ) { String tokenString = responseDTO . getAuthorizationContextToken ( ) . getTokenString ( ) ; String [ ] tokenElements = tokenString . split ( "\\." ) ; JSONObject jwtJsonObject = new JSONObject ( new String ( Base64 . decodeBase64 ( tokenElements [ 1 ] ) ) ) ; String jwtClaimMappingRoleValues = jwtJsonObject . get ( WSO2_CLAIM_DIALECT_ROLE ) . toString ( ) ; Assert . assertTrue ( jwtClaimMappingRoleValues . contains ( "," ) , "Broken<seq2seq4repair_space>JWT<seq2seq4repair_space>Token<seq2seq4repair_space>from<seq2seq4repair_space>Authorization<seq2seq4repair_space>context" ) ; String [ ] jwtClaimMappingRoleElements = jwtClaimMappingRoleValues . replaceAll ( "[\\[\\]\"]" , "" ) . split ( "," ) ; List < String > jwtClaimMappingRoleElementsList = Arrays . asList ( jwtClaimMappingRoleElements ) ; <START_BUG> Assert . assertTrue ( jwtClaimMappingRoleElementsList . contains ( "Internal//PlaygroundServiceProver" ) , ( "Invalid<seq2seq4repair_space>" + "JWT<seq2seq4repair_space>Token<seq2seq4repair_space>Role<seq2seq4repair_space>Values" ) ) ; <END_BUG> } } private void changeISConfiguration ( ) throws Exception { } private void resetISConfiguration ( ) throws Exception { } No newline ; at end ; of file ; }

Fix:
Assert . assertTrue ( jwtClaimMappingRoleElementsList . contains ( "Application//PlaygroundServiceProver" ) , ( "Invalid<seq2seq4repair_space>" + "JWT<seq2seq4repair_space>Token<seq2seq4repair_space>Role<seq2seq4repair_space>Values" ) ) ;