DeviceAgentTest code backup