Fix switch_state test.
Fix dummy api's metric store.