protected void startDelivery(Subscriber subscriber, ByteString topic, ByteString subscriberId,
MessageHandler handler) throws Exception {
subscriber.startDelivery(topic, subscriberId, handler);
if (mode == Mode.PROXY) {
WriteRecordingChannel channel = new WriteRecordingChannel();
PubSubRequest request = PubSubRequest.newBuilder().setProtocolVersion(ProtocolVersion.VERSION_ONE)
.setTopic(topic).setTxnId(0).setType(OperationType.START_DELIVERY).setStartDeliveryRequest(
StartDeliveryRequest.newBuilder().setSubscriberId(subscriberId)).build();
proxy.getStartDeliveryHandler().handleRequest(request, channel);
assertEquals(StatusCode.SUCCESS, ((PubSubResponse) channel.getMessagesWritten().get(0)).getStatusCode());
}