I just found that #parameters['test'] returns an array of String. So when you say
you are actually comparing a string '1' with an array {'1'} hence it returns false. Maybe this is because there are two parameters with same name
correct thing to do would be