_server.sendLiveDataToClient();
// Snapshot x 2, subscription data x 2 = 4 overall
assertEquals(4, listener.getValueUpdates().size());
for (int i = 0; i < listener.getValueUpdates().size(); i++) {
LiveDataValueUpdate update = listener.getValueUpdates().get(i);
if (update.getSpecification().equals(spec1)) {
assertEquals(_testMsgs[0], update.getFields());
} else if (update.getSpecification().equals(spec2)) {
assertEquals(_testMsgs[1], update.getFields());
} else {
Assert.fail("Response for non-existent spec received");
}
}
}