Both code and test were doing reverse of what they should do