public static void trimRecordTemplate(RecordTemplate recordTemplate, MaskTree override, final boolean failOnMismatch)
  {
    trimRecordTemplate(recordTemplate.data(), recordTemplate.schema(), override, failOnMismatch);
  }
@Test (expectedExceptions = UnsupportedOperationException.class)
  public void testReadOnly()
  {
    RecordBar bar = new RecordBar();
    bar.setLocation("mountain view");
    bar.data().put("SF", "CA");
    bar.data().makeReadOnly();

    RestUtils.trimRecordTemplate(bar, false);
  }