Repository: wso2/product-microgateway
Issue: Array Index Out of Bounds Error when Jwt transformer is enabled in test cases.

### Description:
Following error case is visible within logs.

```
docker-java-stream-1975420695] INFO Enforcer - STDOUT: [2021-04-05 18:39:21,153] ERROR - JWTAuthenticator Error while getting token from the cache
[docker-java-stream-1975420695] INFO Enforcer - STDOUT: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
[docker-java-stream-1975420695] INFO Enforcer - STDOUT:         at org.wso2.micro.gateway.enforcer.security.jwt.JWTAuthenticator.generateAndRetrieveJWTToken(JWTAuthenticator.java:248) [org.wso2.micro.gateway.enforcer-4.0.0-m10-SNAPSHOT.jar:4.0.0-m10-SNAPSHOT]
[docker-java-stream-1975420695] INFO Enforcer - STDOUT:         at org.wso2.micro.gateway.enforcer.security.jwt.JWTAuthenticator.authenticate(JWTAuthenticator.java:189) [org.wso2.micro.gateway.enforcer-4.0.0-m10-SNAPSHOT.jar:4.0.0-m10-SNAPSHOT]
[docker-java-stream-1975420695] INFO Enforcer - STDOUT:         at org.wso2.micro.gateway.enforcer.security.AuthFilter.authenticate(AuthFilter.java:119) [org.wso2.micro.gateway.enforcer-4.0.0-m10-SNAPSHOT.jar:4.0.0-m10-SNAPSHOT]
[docker-java-stream-1975420695] INFO Enforcer - STDOUT:         at org.wso2.micro.gateway.enforcer.security.AuthFilter.handleRequest(AuthFilter.java:105) [org.wso2.micro.gateway.enforcer-4.0.0-m10-SNAPSHOT.jar:4.0.0-m10-SNAPSHOT]
[docker-java-stream-1975420695
```


### Steps to reproduce:
Run integration tests for JWT Transformer and CustomJWTTransformer

### Affected Product Version:
4.0.0-m10

### Environment details (with versions):
- OS: MacOS big sur
- Client:
- Env (Docker/K8s):

---
### Optional Fields
#### Related Issues:
<!-- Any related issues from this/other repositories-->

#### Suggested Labels:
<!--Only to be used by non-members-->

#### Suggested Assignees:
<!--Only to be used by non-members-->


Changed files:
enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java

diff --git a/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java b/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java
index 38ea1b06c..640fa3ecd 100644
--- a/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java
+++ b/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java
@@ -48,6 +48,7 @@ import org.wso2.choreo.connect.enforcer.exception.MGWException;
 import org.wso2.choreo.connect.enforcer.security.AuthenticationContext;
 import org.wso2.choreo.connect.enforcer.security.Authenticator;
 import org.wso2.choreo.connect.enforcer.security.TokenValidationContext;
+import org.wso2.choreo.connect.enforcer.security.jwt.validator.JWTConstants;
 import org.wso2.choreo.connect.enforcer.security.jwt.validator.JWTValidator;
 import org.wso2.choreo.connect.enforcer.security.jwt.validator.RevokedJWTDataHolder;
 import org.wso2.choreo.connect.enforcer.util.FilterUtils;
@@ -242,7 +243,7 @@ public class JWTAuthenticator implements Authenticator {
             if (isGatewayTokenCacheEnabled) {
                 try {
                     Object token = CacheProvider.getGatewayJWTTokenCache().get(jwtTokenCacheKey);
-                    if (token != null) {
+                    if (token != null && !JWTConstants.UNAVAILABLE.equals(token)) {
                         endUserToken = (String) token;
                         String[] splitToken = ((String) token).split("\\\\.");
                         org.json.JSONObject payload = new org.json.JSONObject(new String(Base64.getUrlDecoder().