Fixed Unit test and copy pasta code