Wsclient POST is giving compile error while calling from Junit test class

I am writing JUnit test for one microservice developed with play-akka framework. In my JUnit class I need to write a test to check another REST endpoint by posting some sample data. I am using WsClient for this but it gives me below compile error:

The type scala.Predef$$less$colon$less cannot be resolved. It is indirectly referenced from required .class files"

However the same way I am invoking the REST endpoint of another service from the microservice and it is working fine. Could you please throw some light what wrong in my code?

Below is the snippet:

private final WSClient _ws;

public ReconciliationTest(final WSClient ws) {
    this._ws = ws;

public void testRestCall() {
    try {
        WSRequest wsrequest = _ws
            .addHeader("Content-Type", "application/json")
            .addHeader("cache-control", "no-cache")

        jsonObj = Json.toJson(requestBean);

        CompletionStage<WSResponse> respComplnStg =;

        resp = respComplnStg.toCompletableFuture().get();
    } catch (Exception ex) {

I am getting compile error at line:

CompletionStage<WSResponse> respComplnStg =;

How are you running the tests? This looks like it could be a problem with the way the classpath is set.

As @TimMoore said, it may be how you are running the tests. Is this happening when using sbt test command?