added unit test for namespace normalization
fixed code for given test cases