Complete tests

Tests porting completed (except for cache tests, they need a new implementation)