Refactored cucumber tests to add custom sql. DAO implementations for tests are not yet working correctly and thus some tests now fail. refs #408