ds: refactore: Move testing code