moved over tests
unit tests, bug discovered: mixing primal and dual form is not working.