Unit tests for naive alg