Actions `cluster:admin/repository/analyze/blob` and `cluster:admin/repository/analyze/register` and so on are only invoked via the transport service, they do not need to register as client actions so we can drop the `ActionType` instance. Instead the root `RepositoryAnalyzeAction` should create and register all these transport actions itself. But even the root `RepositoryAnalyzeAction` should not be an `ActionType` derivative, we should just declare an `ActionType` instance directly. Moreover we can use `ActionType#localOnly` since the client action does not run on remote clusters.
x-pack/plugin/snapshot-repo-test-kit/src/main/java/org/elasticsearch/repositories/blobstore/testkit/ContendedRegisterAnalyzeAction.java
}
    }
    static long longFromBytes(BytesReference bytesReference) {
        if (bytesReference.length() == 0) {
            return 0L;
        } else if (bytesReference.length() == Long.BYTES) {
            try (var baos = new ByteArrayOutputStream(Long.BYTES)) {
                bytesReference.writeTo(baos);
                final var bytes = baos.toByteArray();
                assert bytes.length == Long.BYTES;
                return ByteUtils.readLongBE(bytes, 0);
            } catch (IOException e) {
                assert false : "no IO takes place";
                throw new IllegalStateException("unexpected conversion error", e);
            }
        } else {
            throw new IllegalArgumentException("cannot read long from BytesReference of length " + bytesReference.length());
        }
    }
    static BytesReference bytesFromLong(long value) {
        if (value == 0L) {
            return BytesArray.EMPTY;
        } else {
            final var bytes = new byte[Long.BYTES];
            ByteUtils.writeLongBE(value, bytes, 0);
            return new BytesArray(bytes);
        }
    }
}