mapperBuilder->mapper()->map( SimpleObject::class, new JsonSource('{"value": "foo"}') ); } catch (MappingError $error) { $this->mappingFail($error); } self::assertSame('foo', $object->value); } }