Testing Data matrix generation