add integration test and update how to judge whether line data is valid or not.