# Akka http get route

**URL:** <https://discuss.akka.io/t/akka-http-get-route/2816>\
**Category:** Akka Libraries\
**Created:** [November 27, 2018, 3:58pm UTC](https://discuss.akka.io/t/akka-http-get-route/2816 "2018-11-27T15:58:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhgitgit](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bhgitgit](https://discuss.akka.io/u/bhgitgit)\
**Post date:** [November 27, 2018, 3:58pm UTC](https://discuss.akka.io/t/akka-http-get-route/2816/1 "2018-11-27T15:58:43Z")

</div>

Hi,

I am developing a akka http based webservice using directives. When I run the unit test for the get I have implemented, the get directive path matches but the message send(below is the code):  
case GetUser(userId) =\>  
val user = users.find(\_.id==userId)  
sender()! user

to actor does not seem to work which is failing the test with:  
Request was rejected  
ScalaTestFailureLocation: com.example.UserRoutesSpec at (UserRoutesSpec.scala:74)  
org.scalatest.exceptions.TestFailedException: Request was rejected  
at akka.http.scaladsl.testkit.TestFrameworkInterface$Scalatest.failTest(TestFrameworkInterface.scala:24)  
at akka.http.scaladsl.testkit.TestFrameworkInterface$Scalatest.failTest$(TestFrameworkInterface.scala:24)

pls can you let me know reasons it could be failing.

Thanks
