public function testCanFormatAnAccessRuleModelWithGroup()
{
$id = 1;
$users = ['user1', 'user2'];
$group = 'group';
$model = $this->getMock('Imbo\\Model\\AccessRule');
$model->expects($this->once())->method('getId')->will($this->returnValue($id));
$model->expects($this->once())->method('getUsers')->will($this->returnValue($users));
$model->expects($this->once())->method('getGroup')->will($this->returnValue($group));
$this->assertSame('{"id":1,"users":["user1","user2"],"group":"group"}', $this->formatter->format($model));
}