[kernel] factorize code in test
[kernel] factorize code in test

fperignon/siconos,siconos/siconos,radarsat1/siconos,radarsat1/siconos,fperignon/siconos,siconos/siconos,fperignon/siconos,fperignon/siconos,siconos/siconos,radarsat1/siconos,radarsat1/siconos,fperignon/siconos,siconos/siconos,radarsat1/siconos