// Path: squbs-testkit/src/test/java/org/squbs/testkit/japi/RouteResultInfo.java
// public class RouteResultInfo {
//     private String webContext;
//     private String actorPath;
//     private int result;
// 
//     public String getWebContext() {
//         return webContext;
//     }
// 
//     public void setWebContext(String webContext) {
//         this.webContext = webContext;
//     }
// 
//     public String getActorPath() {
//         return actorPath;
//     }
// 
//     public void setActorPath(String actorPath) {
//         this.actorPath = actorPath;
//     }
// 
//     public int getResult() {
//         return result;
//     }
// 
//     public void setResult(int result) {
//         this.result = result;
//     }
// }


import akka.http.javadsl.marshallers.jackson.Jackson;
import akka.http.javadsl.model.HttpRequest;
import akka.http.javadsl.testkit.TestRoute;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import org.junit.Test;
import org.squbs.testkit.japi.InfoRouteWithActor;
import org.squbs.testkit.japi.RouteResultInfo;
import org.squbs.testkit.japi.JUnitCustomRouteTestKit;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
    public CustomRouteTestKitConfigResourcesTest() {
        super(customConfig, resources, false);
    }

    @Test
    public void testSimpleRoute() {
        TestRoute simpleRoute = testRoute(InfoRouteWithActor.class);
        RouteResultInfo routeInfo = simpleRoute.run(HttpRequest.GET("/decrement/10"))
                .assertStatusCode(200)
                .entity(Jackson.unmarshaller(RouteResultInfo.class));
        assertEquals("", routeInfo.getWebContext());
        assertTrue("ActorPath: " + routeInfo.getActorPath() + " does not start with akka://",
                routeInfo.getActorPath().startsWith("akka://"));
        assertEquals(9, routeInfo.getResult());
        assertEquals("baz", system().settings().config().
                getString("CustomRouteTestKitConfigResourcesTest.foobar"));

    }

    @Test
    public void testSimpleRouteWithContext() {
        TestRoute simpleRoute = testRoute("my-context", InfoRouteWithActor.class);
        RouteResultInfo routeInfo = simpleRoute.run(HttpRequest.GET("/my-context/decrement/20"))
                .assertStatusCode(200)
                .entity(Jackson.unmarshaller(RouteResultInfo.class));
        assertEquals("my-context", routeInfo.getWebContext());
        assertTrue("ActorPath: " + routeInfo.getActorPath() + " does not start with akka://",
                routeInfo.getActorPath().startsWith("akka://"));
        assertEquals(19, routeInfo.getResult());
        assertEquals("baz", system().settings().config().
// Path: squbs-testkit/src/test/java/org/squbs/testkit/japi/RouteResultInfo.java
// public class RouteResultInfo {
//     private String webContext;
//     private String actorPath;
//     private int result;
// 
//     public String getWebContext() {
//         return webContext;
//     }
// 
//     public void setWebContext(String webContext) {
//         this.webContext = webContext;
//     }
// 
//     public String getActorPath() {
//         return actorPath;
//     }
// 
//     public void setActorPath(String actorPath) {
//         this.actorPath = actorPath;
//     }
// 
//     public int getResult() {
//         return result;
//     }
// 
//     public void setResult(int result) {
//         this.result = result;
//     }
// }


// Path: squbs-testkit/src/test/java/org/squbs/testkit/japi/junit/CustomRouteTestKitConfigResourcesTest.java
import akka.http.javadsl.marshallers.jackson.Jackson;
import akka.http.javadsl.model.HttpRequest;
import akka.http.javadsl.testkit.TestRoute;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import org.junit.Test;
import org.squbs.testkit.japi.InfoRouteWithActor;
import org.squbs.testkit.japi.RouteResultInfo;
import org.squbs.testkit.japi.JUnitCustomRouteTestKit;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

    public CustomRouteTestKitConfigResourcesTest() {
        super(customConfig, resources, false);
    }

    @Test
    public void testSimpleRoute() {
        TestRoute simpleRoute = testRoute(InfoRouteWithActor.class);
        RouteResultInfo routeInfo = simpleRoute.run(HttpRequest.GET("/decrement/10"))
                .assertStatusCode(200)
                .entity(Jackson.unmarshaller(RouteResultInfo.class));
        assertEquals("", routeInfo.getWebContext());
        assertTrue("ActorPath: " + routeInfo.getActorPath() + " does not start with akka://",
                routeInfo.getActorPath().startsWith("akka://"));
        assertEquals(9, routeInfo.getResult());
        assertEquals("baz", system().settings().config().
                getString("CustomRouteTestKitConfigResourcesTest.foobar"));

    }

    @Test
    public void testSimpleRouteWithContext() {
        TestRoute simpleRoute = testRoute("my-context", InfoRouteWithActor.class);
        RouteResultInfo routeInfo = simpleRoute.run(HttpRequest.GET("/my-context/decrement/20"))
                .assertStatusCode(200)
                .entity(Jackson.unmarshaller(RouteResultInfo.class));
        assertEquals("my-context", routeInfo.getWebContext());
        assertTrue("ActorPath: " + routeInfo.getActorPath() + " does not start with akka://",
                routeInfo.getActorPath().startsWith("akka://"));
        assertEquals(19, routeInfo.getResult());
        assertEquals("baz", system().settings().config().
                getString("CustomRouteTestKitConfigResourcesTest.foobar"));