private PartitionId getPartitionForPut() throws RouterException {
      List<? extends PartitionId> partitions = clusterMap.getWritablePartitionIds(null);
      if (partitions.isEmpty()) {
        throw new RouterException("No writable partitions available.", RouterErrorCode.AmbryUnavailable);
      }
      return partitions.get(ThreadLocalRandom.current().nextInt(partitions.size()));
    }
Choose a random {@link PartitionId} and return it. This code is partially copied from
{@code PutOperation#getPartitionForPut}.
@return the chosen {@link PartitionId}
@throws RouterException
ambry-test-utils/src/main/java/com/github/ambry/router/InMemoryRouter.java