Add test case for machine.go