public void UpdateData_should_return_fail_without_retries_if_cant_read_data(ZooKeeperStatus errorStatus) { const string path = "zk/default"; zooKeeperClient.GetDataAsync(Arg.Any <GetDataRequest>()).Returns(GetDataResult.Unsuccessful(errorStatus, path, null)); zooKeeperClient.UpdateData(new UpdateDataRequest(path, dummyUpdate)) .Should() .BeEquivalentTo(UpdateDataResult.Unsuccessful(errorStatus, path, null)); zooKeeperClient.ReceivedWithAnyArgs(1) .GetDataAsync(Arg.Any <GetDataRequest>()); zooKeeperClient.DidNotReceiveWithAnyArgs() .SetDataAsync(Arg.Any <SetDataRequest>()); }