Skip to content

Commit

Permalink
Update AccessLogContextTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Aug 5, 2024
1 parent 282e97e commit ad2f131
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.junit.Before;
import org.junit.Test;

import java.util.Collections;
import java.util.Map;

public class AccessLogContextTest {
Expand All @@ -16,7 +17,7 @@ public void setUp() {

@Test
public void testSimpleRender() {
AccessLogContext context = new AccessLogContext("127.0.0.1", "/path", 100, 1000L, Map.of("x-header", "value"));
AccessLogContext context = new AccessLogContext("127.0.0.1", "/path", 100, 1000L, Collections.singletonMap("x-header", "value"));
String result = context.format(template);
Assert.assertEquals("Formatted 127.0.0.1 /path 100 1000 value", result);
}
Expand Down

0 comments on commit ad2f131

Please sign in to comment.