sw test tool: refactor: Add a class that receives messages
sw test tool: refactor: Move a test state variable to TestPart class

  OfTester.state ->
  TestPart.state

And add getter/setter methods.

  TestPart.get_state()
  TestPart.set_state(state)
sw test tool: refactor: Move a list of transaction ids to TestPart class

  OfTester.send_msg_xids ->
  TestPart.send_msg_xids

And add getter/setter methods.

  TestPart.add_xid(xid)
  TestPart.get_xids()
  TestPart.reset_xids()
sw test tool: refactor: Move a list of received messages to TestPart class

  OfTester.rcv_msgs ->
  TestPart.rcv_msgs

And add getter/setter methods.

  TestPart.add_msg(msg)
  TestPart.get_msgs()
  TestPart.reset_msgs()
sw test tool: refactor: Move a method that waits to receive messages to TestPart class

  OfTester._wait() ->
  TestPart.wait()

And move a variable that is used by the method.

  OfTester.waiter ->
  TestPart.waiter
sw test tool: refactor: Move methods that handle messages to TestPart class

  OfTester.flow_stats_reply_handler(ev) ->
  TestPart.flow_stats_reply_hanlder(ev)

  OfTester.table_stats_reply_hanlder(ev) ->
  TestPart.table_stats_reply_handler(ev)

  OfTester.port_stats_reply_hanlder(ev) ->
  TestPart.port_stats_reply_hanlder(ev)

  OfTester.barrier_reply_handler(ev) ->
  TestPart.barrier_reply_handler(ev)

  OfTester.packet_in_handler(ev) ->
  TestPart.packet_in_handler(ev)

  OfTester.error_msg_handler(ev) ->
  TestPart.error_msg_handler(ev)

And instantiate TestPart class as a context to enable those handlers.
sw test tool: refactor: Remove unnecessary methods

[obsolete]
  TestPart.get_xids()
  TestPart.add_msgs(msg)

[integrated]
  TestPart.reset_xids() and TestPart.reset_msgs() ->
  TestPart.reset()
sw test tool: refactor: Add a class that expresses 'prerequisite' part

And change TestPart class to an abstract class.
sw test tool: refactor: Add basic methods to TestPart class
sw test tool: refactor: Change the type of Test.prerequisite

  isinstance(Test.prerequisite, list) == True ->
  isinstance(Test.prerequisite, TestPrerequisite) == True
sw test tool: refactor: Add a setup method to Test class
sw test tool: refactor: Add a parse method to TestPrerequisite class

And remove the same codes from Test class.
sw test tool: refactor: Move a method that initializes a test to TestPrerequisite class

  OfTester._test_initialize() ->
  TestPrerequisite.prepare()
sw test tool: refactor: Move a method that installs flow entries to TestPrerequisite class

  OfTester._test_flow_install(flow) ->
  TestPrerequisite._flow_install(mod)
sw test tool: refactor: Move a method that checks flow entries to TestPrerequisite class

  OfTester._test_flow_exist_check(flow) ->
  TestPrerequisite._flow_exist_check(mod)
sw test tool: refactor: Move a method that compares flow entries to TestPrerequisite class

  OfTester._compare_flow(stats1, stats2) ->
  TestPrerequisite._compare_flow(stats1, stats2)
sw test tool: refactor: Move loop processing to TestPrerequisite class
sw test tool: refactor: Move methods that handle messages to TestPrerequisite class

Move methods that handle messages used by TestPrerequisite class into TestPrerequisite class.
TestPrerequisite instance operates in the following states:

  - STATE_INIT
  - STATE_FLOW_INSTALL
  - STATE_FLOW_EXIST_CHK

Therefore, move or separate methods according to the state as follows.

For STATE_FLOW_EXIST_CHK:

  TestPart.flow_stats_reply_handler(ev) ->
  TestPrerequisite.flow_stats_reply_handler(ev)

For STATE_INIT and STATE_FLOW_INSTALL:

  TestPart.barrier_reply_handler(ev) ->
  TestPrerequisite.barrier_reply_handler(ev)

For other states:

  TestPart.barrier_reply_handler(ev) ->
  TestPart.barrier_reply_handler_old(ev)
                                ^^^^ <- rename to avoid duplication
                                        and will be solved by future patch series
sw test tool: Modify OpenFlowSw._send_msg() as a public method

OpenFlowSw is now enabled to send raw messages.
sw test tool: Modify OpenFlowSw.add_flow() not to send raw messages