PutAllPRMessage extends PartitionMessageWithDirectReply { void doPostPutAll(PartitionedRegion r, DistributedPutAllOperation dpao, BucketRegion bucketRegion, boolean lockedForPrimary) { try { dpao.setUseFakeEventId(true); r.checkReadiness(); bucketRegion.getDataView().postPutAll(dpao, this.versions, bucketRegion); r.checkReadiness(); } finally { if (lockedForPrimary) { bucketRegion.doUnlockForPrimary(); } } } PutAllPRMessage();  PutAllPRMessage(int bucketId, int size, boolean notificationOnly, boolean posDup,
      boolean skipCallbacks, Object callbackArg); void addEntry(PutAllEntryData entry); void initMessage(PartitionedRegion r, Set recipients, boolean notifyOnly,
      DirectReplyProcessor p); @Override boolean isSevereAlertCompatible(); void setPossibleDuplicate(boolean posDup); int getSize(); Set getKeys(); PartitionResponse send(DistributedMember recipient, PartitionedRegion r); void setBridgeContext(ClientProxyMembershipID contx); @Override int getDSFID(); @Override void fromData(DataInput in,
      DeserializationContext context); @Override void toData(DataOutput out,
      SerializationContext context); @Override EventID getEventID(); @Retained EntryEventImpl getFirstEvent(PartitionedRegion r); @edu.umd.cs.findbugs.annotations.SuppressWarnings("IMSE_DONT_CATCH_IMSE") boolean doLocalPutAll(PartitionedRegion r, InternalDistributedMember eventSender,
      long lastModified); VersionedObjectList getVersions(); @Override boolean canStartRemoteTransaction(); @Retained static EntryEventImpl getEventFromEntry(InternalRegion r, InternalDistributedMember myId,
      InternalDistributedMember eventSender, int idx, PutAllEntryData[] data,
      boolean notificationOnly, ClientProxyMembershipID bridgeContext, boolean posDup,
      boolean skipCallbacks); void setInternalDs(InternalDistributedSystem internalDs); void setDirectAck(boolean directAck); @Override String toString();  }
@Test public void doPostPutAllCallsCheckReadinessBeforeAndAfter() throws Exception { DistributedPutAllOperation distributedPutAllOperation = mock(DistributedPutAllOperation.class); InternalDataView internalDataView = mock(InternalDataView.class); when(bucketRegion.getDataView()).thenReturn(internalDataView); PutAllPRMessage putAllPRMessage = new PutAllPRMessage(); putAllPRMessage.doPostPutAll(partitionedRegion, distributedPutAllOperation, bucketRegion, true); InOrder inOrder = inOrder(partitionedRegion, internalDataView); inOrder.verify(partitionedRegion).checkReadiness(); inOrder.verify(internalDataView).postPutAll(any(), any(), any()); inOrder.verify(partitionedRegion).checkReadiness(); }