Mechanisms for automatically generating code that tests capabilities of a
test computing system to simulate a message exchange pattern. The code
generation computing system uses a message exchange pattern definition to
generate the simulation code. For each state in which the message
exchange pattern definition allows valid messages to be transmitted, code
is generated for that state that at least simulates the transmission of a
valid transmission message. For each state in which the message exchange
pattern definition allows valid messages to be received, code is
generated for that state that simulates the receipt of a valid receipt
message. If the transmission or receipt of the message causes a state
transition to occur, code is generated that causes the appropriate state
transition in the message exchange pattern.