protocolVersion = OperationUtil.getProtocolVersion(Collections.singletonList(operation));
assertEquals("Non notify op as first op should return default", ProtocolVersion.DEFAULT,
protocolVersion);
OperationRequest notifyOp = new OperationRequest(OperationType.ROBOT_NOTIFY.method(), "op1");
protocolVersion = OperationUtil.getProtocolVersion(Collections.singletonList(notifyOp));
assertEquals("Notify op as first op without version parameter should return default",
ProtocolVersion.DEFAULT, protocolVersion);
Parameter versionParameter =
Parameter.of(ParamsProperty.PROTOCOL_VERSION, ProtocolVersion.V2_1.getVersionString());
notifyOp = new OperationRequest(OperationType.ROBOT_NOTIFY.method(), "op1", versionParameter);
protocolVersion = OperationUtil.getProtocolVersion(Collections.singletonList(notifyOp));
assertEquals(
"Notify op as first op should return its version", ProtocolVersion.V2_1, protocolVersion);
}