Fixed unit test (and removed warnings)