public static String extractAppIdFromRoleName(String roleName) {
     Iterator<String> parts = STRING_SPLITTER.split(roleName).iterator();
     if (parts.hasNext()) {
       String roleType = parts.next();
       if (RoleType.isValidRoleType(roleType) && parts.hasNext()) {
         return parts.next();
       }
     }
     return null;
  }
@Test
  public void testExtractAppIdFromRoleName() throws Exception {
    assertEquals("someApp", RoleUtils.extractAppIdFromRoleName("Master+someApp"));
    assertEquals("someApp", RoleUtils.extractAppIdFromRoleName("ModifyNamespace+someApp+xx"));
    assertEquals("app1", RoleUtils.extractAppIdFromRoleName("ReleaseNamespace+app1+application"));
  }