*/
public void testThreadContention() throws Exception
{
// enforces only 1 thread and no timeout which makes it
// fail quickly
final TPCThreadManager threadManager = new TPCThreadManager();
threadManager.parameterize( createParameters( 1, 0 ) );
threadManager.initialize();
// an obviously syncronized component
final StringBuffer result = new StringBuffer();
final StringWriter exceptionBuffer = new StringWriter();
final PrintWriter errorOut = new PrintWriter( exceptionBuffer );
threadManager.register( new Pipeline( result, errorOut ) );
// sleeps for 1 more scheduling timeout to surely go over limit
Thread.sleep( SCHEDULING_TIMEOUT * ( MINIMAL_NUMBER_INVOCATIONS + 1 ) );
int numberCalls = result.length();