private static String trimVersion(String apiVersion){
  if (apiVersion == null) {
    return null;
  }
 else {
    String[] versionParts=apiVersion.split("/");
    return versionParts[versionParts.length - 1];
  }
}

private static String trimVersion ( String apiVersion ) { if ( apiVersion == null ) { return null ; } else { String [ ] versionParts = apiVersion . split ( "/" ) ; return versionParts [ versionParts . length - 1 ] ; } }
separates apiversion for apigroup / apiversion combination .
