Test methods look rather complex. Take a look at http://www.rexsl.com/rexsl-test/apidocs-0.11/com/rexsl/test/mock/MkContainer.html I think it's better to use this class here