added unit tests for trailing slash