Extract test code.