Fix test and add assertion