public function testCreateProduct()
 {
     $data = array('name' => $this->faker->name, 'driver_id' => 1, 'description' => $this->faker->text(), 'photos' => array(array('order' => 1, 'url' => $this->faker->imageUrl(250, 250)), array('order' => 2, 'url' => $this->faker->imageUrl(250, 250)), array('order' => 3, 'url' => $this->faker->imageUrl(250, 250))), 'tax_amount' => $this->faker->randomFloat(2, 0, 2), 'unit_price' => $this->faker->randomFloat(1, 2, 10), 'category_id' => 1, 'inventory' => 0, 'average_cost' => 0, 'costs' => array(array('unit_cost' => 10.7, 'inventory' => 10), array('unit_cost' => 5.25, 'inventory' => 20), array('unit_cost' => 7.0, 'inventory' => 15)));
     $this->assertEquals(0, Product::all()->count());
     $response = json_decode($this->call('post', 'drivers/1/products', $data)->getContent(), true);
     $this->assertResponseStatus(201);
     $this->assertEquals(1, Product::all()->count());
     $this->assertEquals(3, Product::find(1)->costs->count());
 }