public function testSerialize() {
$this->serializer = new Serializer(array(
new GetSetMethodNormalizer(),
), array(
'json' => new JsonEncoder(),
));
$data = array(
'title' => 'foo',
'numbers' => array(
5,
3,
),
);
$result = $this->serializer
->serialize(Model::fromArray($data), 'json');
$this
->assertEquals(json_encode($data), $result);
}