Remove duplication in depend.scala, added ThrownExpectations.