This test will fail for a few reasons.
First, you have array( id, array(data)), array(id ...
It should be array(id, array(array(data), array(data)...

Next, the return isn't an array of data but an array of rule entities.