tests for extracted code