@Test 
public void testRecurisveLinearizingComposer() {

    logger.debug("Starting recursive linearing composer tests.");
    BasePolynomialFunction f = (BasePolynomialFunction)SimplePolynomialFunctions.denseRandomMultivariateQuadratic( 128 , 128);
    BasePolynomialFunction inner = (BasePolynomialFunction) EnhancedBitMatrix.randomMatrix( 128 , 256 ) .multiply(  SimplePolynomialFunctions.identity( 256 ) );
    
    
    RecursiveLinearizingComposer composer = new RecursiveLinearizingComposer( f );
    Stopwatch watch = Stopwatch.createStarted();
    SimplePolynomialFunction composed = composer.compose( inner );
    logger.info( "Compose time: {} ms" , watch.elapsed( TimeUnit.MILLISECONDS ) );
    
    BitVector input =  BitVectors.randomVector( inner.getInputLength() );
    BitVector expected = f.apply( inner.apply( input ) );
    BitVector actual = composed.apply( input );
    
    Assert.assertEquals( expected , actual );
}