Device state management tests