sort dictionary parameters by keys. add unit tests for SNS