Roles { public static String getInterpolatedRoleName(String rawName, String... oids) { StringBuffer interpolatedRoleName = new StringBuffer(); Matcher matcher = ROLE_OID_REGEX.matcher(rawName); int i=0; while(matcher.find()){ matcher.appendReplacement(interpolatedRoleName, oids[i]); i++; } matcher.appendTail(interpolatedRoleName); return interpolatedRoleName.toString(); }  static String getInterpolatedRoleName(String rawName, String... oids); static String getInterpolatedRoleNameWithPrefix(String rolePrefix, String rawName, String... oids);  }
@Test public void should_roles_interpolation_works() { assertThat(Roles.getInterpolatedRoleName(this.rawName, this.oids)).isEqualTo(this.expectedInterpolatedRole); }