I failed to find something simplier than scalatra. Although code on main page is really simple you would have to do some extra work to embed scalatra in your own app/tests.
import org.scalatra._
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.webapp.WebAppContext
private class Mocker extends ScalatraServlet {
get("/somepath") {
<h1>Mocked response</h1>
}
}
// ↓ you won't need that part if you start jetty as sbt command
private val jetty = new Server(8080)
private val context = new WebAppContext()
context setContextPath "/"
context setResourceBase "/tmp"
context addServlet(classOf[Mocker], "/*")
jetty.setHandler(context)
jetty.start
Standalone app is really that simple.