Updated with more robust tests.
Added test entities.