Overhauled createTestdata again
Created mothod getTestdataInPeriod