public static void trimRecordTemplate(RecordTemplate recordTemplate, MaskTree override, final boolean failOnMismatch)
  {
    trimRecordTemplate(recordTemplate.data(), recordTemplate.schema(), override, failOnMismatch);
  }
@Test
  public void testRefTrim() throws CloneNotSupportedException
  {
    TyperefTest test = new TyperefTest();
    test.setImportRef(1.0);
    test.setImportRef2(2.0);

    RecordTemplate expected = test.copy();

    // Introduce bad elements
    test.data().put("troublemaker", "boo");
    Assert.assertEquals(test.data().size(), 3);
    RestUtils.trimRecordTemplate(test, false);
    Assert.assertEquals(test, expected);
  }