ProtoMessageSchema extends GetterBasedSchemaProvider { @Nullable @Override public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor) { checkForDynamicType(typeDescriptor); return ProtoSchemaTranslator.getSchema((Class<Message>) typeDescriptor.getRawType()); }  @Nullable @Override Schema schemaFor(TypeDescriptor<T> typeDescriptor); @Override List<FieldValueGetter> fieldValueGetters(Class<?> targetClass, Schema schema); @Override List<FieldValueTypeInformation> fieldValueTypeInformations(
      Class<?> targetClass, Schema schema); @Override SchemaUserTypeCreator schemaTypeCreator(Class<?> targetClass, Schema schema);  }
@Test public void testPrimitiveSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(Primitive.class)); assertEquals(PRIMITIVE_SCHEMA, schema); }
@Test public void testOptionalPrimitiveSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(OptionalPrimitive.class)); assertEquals(OPTIONAL_PRIMITIVE_SCHEMA, schema); }
@Test public void testRequiredPrimitiveSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(RequiredPrimitive.class)); assertEquals(REQUIRED_PRIMITIVE_SCHEMA, schema); }
@Test public void testRepeatedSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(RepeatPrimitive.class)); assertEquals(REPEATED_SCHEMA, schema); }
@Test public void testMapSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(MapPrimitive.class)); assertEquals(MAP_PRIMITIVE_SCHEMA, schema); }
@Test public void testNestedSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(Nested.class)); assertEquals(NESTED_SCHEMA, schema); }
@Test public void testOneOfSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(OneOf.class)); assertEquals(ONEOF_SCHEMA, schema); }
@Test public void testOuterOneOfSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(OuterOneOf.class)); assertEquals(OUTER_ONEOF_SCHEMA, schema); }
@Test public void testEnumSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(EnumMessage.class)); assertEquals(ENUM_SCHEMA, schema); }
@Test public void testWktMessageSchema() { Schema schema = new ProtoMessageSchema().schemaFor(TypeDescriptor.of(WktMessage.class)); assertEquals(WKT_MESSAGE_SCHEMA, schema); }