@@ -32,25 +32,57 @@ public void init() {
3232 requestMetric = new RequestMetricInfo ();
3333 }
3434
35+ @ Test
36+ public void testParsePathSingleSlash () {
37+ String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS , "/" );
38+ Assertions .assertEquals ("/" , path );
39+ }
40+
3541 @ Test
3642 public void testParsePathDoubleSlash () {
3743 String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS , "//" );
3844 Assertions .assertEquals ("/" , path );
3945 }
4046
47+ @ Test
48+ public void testParsePathMultipleSlash () {
49+ String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS , "/////" );
50+ Assertions .assertEquals ("/" , path );
51+ }
52+
4153 @ Test
4254 public void testParseEmptyPath () {
4355 String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS , "" );
4456 Assertions .assertEquals ("/" , path );
4557 }
4658
59+ @ Test
60+ public void testParseNullPath () {
61+ String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS , null );
62+ Assertions .assertEquals ("/" , path );
63+ }
64+
4765 @ Test
4866 public void testParsePathNoLeadingSlash () {
4967 String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS ,
5068 "path/with/no/leading/slash" );
5169 Assertions .assertEquals ("/path/with/no/leading/slash" , path );
5270 }
5371
72+ @ Test
73+ public void testParsePathNoEndSlash () {
74+ String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS ,
75+ "/path/with/no/end/slash/" );
76+ Assertions .assertEquals ("/path/with/no/end/slash" , path );
77+ }
78+
79+ @ Test
80+ public void testParsePathNoEndDoubleSlash () {
81+ String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , NO_IGNORE_PATTERNS ,
82+ "/path/with/no/end/double/slash///////" );
83+ Assertions .assertEquals ("/path/with/no/end/double/slash" , path );
84+ }
85+
5486 @ Test
5587 public void testParsePathIgnoreNoLeadingSlash () {
5688 String path = requestMetric .getNormalizedUriPath (NO_MATCH_PATTERNS , ignorePatterns ,
0 commit comments