public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
    ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
    Ir copy = createIrCopy(ir);
    return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
  }
@Test
  public void testFromIr() throws Exception {
    Ir ir = getIr(OnlyPrimitives.RESOURCE_PATH);

    SbeSchema actual = SbeSchema.fromIr(ir, IrOptions.DEFAULT);

    assertNotNull(actual.getIr());
    assertNotSame(ir, actual.getIr());
    assertEquals(IrOptions.DEFAULT, actual.getIrOptions());
    assertEquals(OnlyPrimitives.FIELDS, actual.getSbeFields());
  }