public static Format of(final FormatInfo formatInfo) {
    final Format format = fromName(formatInfo.getFormat().toUpperCase());
    format.validateProperties(formatInfo.getProperties());
    return format;
  }
@Test
  public void shouldNotThrowWhenCreatingFromSupportedProperty() {
    // Given:
    final FormatInfo avroFormatInfo = FormatInfo.of("AVRO",
        ImmutableMap.of("schemaId", "1", "fullSchemaName", "avroName"));
    final FormatInfo protobufFormatInfo = FormatInfo.of("PROTOBUF",
        ImmutableMap.of("schemaId", "1", "fullSchemaName", "protoName"));
    final FormatInfo jsonSRFormatInfo = FormatInfo.of("JSON_SR",
        ImmutableMap.of("schemaId", "123", "fullSchemaName", "jsonName"));

    // When: Then:
    assertThat(FormatFactory.of(avroFormatInfo), is(FormatFactory.AVRO));
    assertThat(FormatFactory.of(protobufFormatInfo), is(FormatFactory.PROTOBUF));
    assertThat(FormatFactory.of(jsonSRFormatInfo), is(FormatFactory.JSON_SR));
  }