// Path: core/src/main/java/com/softwaremill/session/javadsl/SessionTransports.java
// public static final SetSessionTransport CookieST = CookieST$.MODULE$;
// 
// Path: core/src/main/java/com/softwaremill/session/javadsl/SessionTransports.java
// public static final SetSessionTransport HeaderST = HeaderST$.MODULE$;


import akka.http.javadsl.model.HttpHeader;
import akka.http.javadsl.model.HttpRequest;
import akka.http.javadsl.model.StatusCodes;
import akka.http.javadsl.model.headers.Cookie;
import akka.http.javadsl.model.headers.HttpCookie;
import akka.http.javadsl.model.headers.RawHeader;
import akka.http.javadsl.server.Route;
import akka.http.javadsl.testkit.TestRouteResult;
import akka.http.scaladsl.model.HttpResponse;
import com.softwaremill.session.CsrfCheckMode;
import com.softwaremill.session.SessionContinuity;
import com.softwaremill.session.SetSessionTransport;
import org.junit.Assert;
import org.junit.Test;
import static com.softwaremill.session.javadsl.SessionTransports.CookieST;
import static com.softwaremill.session.javadsl.SessionTransports.HeaderST;

    @Test
    public void shouldSetBoth_TheSessionAndRefreshTokenWhen_UsingCookies() {
        // given
        final Route route = createRoute(CookieST);

        // when
        TestRouteResult testRouteResult = testRoute(route)
            .run(HttpRequest.GET("/set"));

        // then
        testRouteResult
            .assertStatusCode(StatusCodes.OK)
            .assertEntity("ok");

        // and
        HttpResponse response = testRouteResult.response();

        // check _refreshtoken cookie
        HttpCookie refreshTokenCookie = getRefreshTokenCookieValues(response);
        Assert.assertNotNull(refreshTokenCookie.value());

        // check _sessiondata cookie
        HttpCookie sessionDataCookie = getSessionDataCookieValues(response);
        Assert.assertNotNull(sessionDataCookie.value());
    }

    @Test
    public void shouldSetBoth_TheSessionAndRefreshTokenWhen_UsingHeaders() {
        // given
// Path: core/src/main/java/com/softwaremill/session/javadsl/SessionTransports.java
// public static final SetSessionTransport CookieST = CookieST$.MODULE$;
// 
// Path: core/src/main/java/com/softwaremill/session/javadsl/SessionTransports.java
// public static final SetSessionTransport HeaderST = HeaderST$.MODULE$;


// Path: javaTests/src/test/java/com/softwaremill/session/javadsl/RefreshableTest.java
import akka.http.javadsl.model.HttpHeader;
import akka.http.javadsl.model.HttpRequest;
import akka.http.javadsl.model.StatusCodes;
import akka.http.javadsl.model.headers.Cookie;
import akka.http.javadsl.model.headers.HttpCookie;
import akka.http.javadsl.model.headers.RawHeader;
import akka.http.javadsl.server.Route;
import akka.http.javadsl.testkit.TestRouteResult;
import akka.http.scaladsl.model.HttpResponse;
import com.softwaremill.session.CsrfCheckMode;
import com.softwaremill.session.SessionContinuity;
import com.softwaremill.session.SetSessionTransport;
import org.junit.Assert;
import org.junit.Test;
import static com.softwaremill.session.javadsl.SessionTransports.CookieST;
import static com.softwaremill.session.javadsl.SessionTransports.HeaderST;


    @Test
    public void shouldSetBoth_TheSessionAndRefreshTokenWhen_UsingCookies() {
        // given
        final Route route = createRoute(CookieST);

        // when
        TestRouteResult testRouteResult = testRoute(route)
            .run(HttpRequest.GET("/set"));

        // then
        testRouteResult
            .assertStatusCode(StatusCodes.OK)
            .assertEntity("ok");

        // and
        HttpResponse response = testRouteResult.response();

        // check _refreshtoken cookie
        HttpCookie refreshTokenCookie = getRefreshTokenCookieValues(response);
        Assert.assertNotNull(refreshTokenCookie.value());

        // check _sessiondata cookie
        HttpCookie sessionDataCookie = getSessionDataCookieValues(response);
        Assert.assertNotNull(sessionDataCookie.value());
    }

    @Test
    public void shouldSetBoth_TheSessionAndRefreshTokenWhen_UsingHeaders() {
        // given
        final Route route = createRoute(HeaderST);