I would suggest to author to look at functional languages, like Haskell. These are based on principles of function composition and referential transparency.
The move from testing to static analysis is happening there, in the expressiveness of the type system, and its inferences. Functional languages are on the forefront of experimentation with new type systems.