Cleanup tests

* Use TestNG assertions
* Formatted code in compute tests
* Removed unnecessary local variables in tests to avoid using them by
  mistake between independent tests.