Export functionality and test case