For an example:
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-observation/sr…
If you need to access components you should use
AbstractComponentTestCase from shared-tests (instead of
AbstractXWikiComponentTestCase which is for JUnit 3.x and JMock 1.x).
Here's my +1
Thanks
-Vincent