Feature model tests

Rewrote tests so that the tests are focussed on testing the methods we wrote and not the underlying ORM. Also fixed some errors that were highlighted by the new tests.