Was this a reverted condition? It seems that a code that can only be called be a test needs to be allowed when assertions are on.
When assertions are off, it should throw IllegalStateException. Right?
1.1 --- a/samples/individualsamples/src/org/apidesign/samples/CodeThatCanBeCalledOnlyByTest.java Wed Aug 08 23:25:59 2012 +0200
1.2 +++ b/samples/individualsamples/src/org/apidesign/samples/CodeThatCanBeCalledOnlyByTest.java Wed Aug 08 23:55:35 2012 +0200
1.3 @@ -11,7 +11,7 @@
1.4 // BEGIN: call.only.by.test
1.5 boolean assertionsOn = false;
1.6 assert assertionsOn = true;
1.7 - if (assertionsOn) {
1.8 + if (!assertionsOn) {
1.9 throw new IllegalStateException("This is a testing method only!");
1.10 }
1.11 // END: call.only.by.test