public static void trimRecordTemplate(RecordTemplate recordTemplate, MaskTree override, final boolean failOnMismatch)
  {
    trimRecordTemplate(recordTemplate.data(), recordTemplate.schema(), override, failOnMismatch);
  }
@Test
  public void testRecord() throws CloneNotSupportedException
  {
    RecordBar bar = new RecordBar();
    bar.setLocation("mountain view");
    RecordBar expected = bar.copy();

    // Introduce bad elements
    bar.data().put("SF", "CA");

    Assert.assertEquals(bar.data().size(), 2);
    RestUtils.trimRecordTemplate(bar, false);
    Assert.assertEquals(bar, expected);
  }