factorize code in compilation unit tests