Schemas { @Nullable public static Schema project(final Schema schema, final CharSequence... paths) { return project(schema, Arrays.asList(paths)); } private  Schemas(); static void diff(final Schema s1, final Schema s2, final Consumer<SchemaDiff> diffs); @Nullable static Schema getFromUnion(final Schema what, final Schema unionSchema); static void deprecations(final Schema schema,
          final BiConsumer<String, String> toPut); @Nonnull static ImmutableSchema immutable(final Schema schema); @Nonnull static ImmutableSchema immutable(final Schema schema, final boolean withSerializationSignificatAttrsonly); static T visit(final Schema start, final SchemaVisitor<T> visitor); static boolean isNullableUnion(final Schema schema); @Nullable static Schema nullableUnionSchema(final Schema schema); @Nullable static Schema getSchemaFromUnionByName(final Schema unionSchema, final String name); @Nullable static Schema getSubSchema(final Schema schema, final CharSequence path); static Schema projectRecord(final Schema schema, final int[] projection); @Nullable static Schema project(final Schema schema, final CharSequence... paths); @Nullable static Schema project(final Schema schema, final List<? extends CharSequence> paths); static boolean isSameFields(final List<Schema.Field> f1s, final List<Schema.Field> f2s); @Nullable static IndexedRecord project(final Schema toSchema, final Schema fromSchema,
          @Nullable final IndexedRecord object); @Nullable @SuppressFBWarnings("URV_UNRELATED_RETURN_VALUES") static Object project(final Schema toSchema, final Schema fromSchema, @Nullable final Object object); @Nullable static Schema.Field getPos(final Schema.Field field, final Schema recordSchema); @Nullable static Schema.Field getField(final String name, final Iterable<Field> fields); static boolean isNamed(final String name, final Field field); static Schema dateString(); static Schema instantString(); static Schema temporalString();  }
@Test public void testProjections2() { Schema project = Schemas.project(DemoRecordInfo.SCHEMA$, "demoRecord.id", "bubu"); Assert.assertNull(project); }
@Test public void testProjectionSame() { Schema tSchema = TestRecord.getClassSchema(); Schema subSchema = Schemas.project(tSchema, ""); Assert.assertEquals(tSchema, subSchema); }