public static DataSchema buildSchemaByProjection(DataSchema schema, DataMap maskMap)
  {
    return buildSchemaByProjection(schema, maskMap, Collections.emptyList());
  }
@Test
  public void testBuildSchemaByProjectionNonexistentFields()
  {
    RecordDataSchema schema = (RecordDataSchema) DataTemplateUtil.getSchema(RecordTemplateWithPrimitiveKey.class);
    DataMap projectionMask = buildProjectionMaskDataMap("id", "nonexistentFieldFooBar");

    try
    {
      buildSchemaByProjection(schema, projectionMask);
    }
    catch (InvalidProjectionException e)
    {
      Assert.assertEquals(e.getMessage(), "Projected field \"nonexistentFieldFooBar\" not present in schema \"" + schema.getFullName() + "\"");
      return;
    }

    Assert.fail("Building schema by projection with nonexistent fields should throw an InvalidProjectionException");
  }