Refactor to extract generation of test data
Make artificial data use numpy arrays