import org.scalatest.{ FlatSpec, Matchers, ParallelTestExecution } import org.scalatest.concurrent.ScalaFutures import org.apache.thrift.TApplicationException class
You can also try this Something Simple and Short
test("some test throwing SQL Exception") { val f: Future[Something] = someObject.giveMeAFuture recoverToSucceededIf[SQLException](f) }