### Question:
ObjectMapperFactoryV2 { public static ObjectMapper create(BlockAllocator allocator) { return new StrictObjectMapper(allocator); } private  ObjectMapperFactoryV2(); static ObjectMapper create(BlockAllocator allocator);  }### Answer:
@Test(expected = JsonMappingException.class) public void testStrictSerializer() throws JsonProcessingException { try (BlockAllocator allocator = new BlockAllocatorImpl()) { ObjectMapper mapper = VersionedObjectMapperFactory.create(allocator); mapper.writeValueAsString(new ArrowType.Null()); } }
@Test(expected = JsonMappingException.class) public void testStrictDeserializer() throws IOException { try (BlockAllocator allocator = new BlockAllocatorImpl()) { ObjectMapper mapper = VersionedObjectMapperFactory.create(allocator); mapper.readValue("{\"@type\" : \"FloatingPoint\", \"precision\" : \"DOUBLE\"}", ArrowType.FloatingPoint.class); } }