def testCreate(self):
    # shows that a call to .Create() will get the routing table info followed
    # by the create-vpc-endpoint call
    endpoint = self._InitEndpoint(VPC_ID)
    self.mock_run_cmd.reset_mock()
    self.mock_run_cmd.side_effect = [
        [],  # query for endpoint id
        [ROUTE_TABLE_ID],  # query for route tables
        CREATE_RES,  # _Create()
        [ENDPOINT_ID],  # _Exists()
    ]
    endpoint.Create()
    calls = endpoint._RunCommand.call_args_list
    self.assertEqual(mock.call(QUERY_ENDPOINTS_CMD), calls[0])
    self.assertEqual(mock.call(DESCRIBE_ROUTES_CMD), calls[1])
    self.assertEqual(mock.call(CREATE_ENDPOINT_CMD), calls[2])
    self.assertEqual(mock.call(QUERY_ENDPOINTS_CMD), calls[3])
    self.assertEqual(ENDPOINT_ID, endpoint.id)