public Container getRandomContainer(short accountId) {
    // adding +2 so that the ID is not 0 or 1
    short refContainerId = (short) (TestUtils.RANDOM.nextInt(Short.MAX_VALUE - 1) + 2);
    String refContainerName = TestUtils.getRandomString(10);
    Container.ContainerStatus refContainerStatus = Container.ContainerStatus.ACTIVE;
    String refContainerDescription = TestUtils.getRandomString(10);
    boolean refContainerEncryption = TestUtils.RANDOM.nextBoolean();
    boolean refContainerPreviousEncryption = refContainerEncryption || TestUtils.RANDOM.nextBoolean();
    boolean refContainerCaching = true;
    boolean refContainerMediaScanDisabled = TestUtils.RANDOM.nextBoolean();
    boolean refContainerBackupEnabled = TestUtils.RANDOM.nextBoolean();
    String refUserMetadataKeyToNotPrefix = TestUtils.getRandomString(10);
    long refCacheTtlInSecond = TestUtils.RANDOM.nextInt(123456) + 123456;
    return new ContainerBuilder(refContainerId, refContainerName, refContainerStatus, refContainerDescription,
        accountId).setEncrypted(refContainerEncryption)
        .setPreviouslyEncrypted(refContainerPreviousEncryption)
        .setCacheable(refContainerCaching)
        .setMediaScanDisabled(refContainerMediaScanDisabled)
        .setTtlRequired(false)
        .setSecurePathRequired(false)
        .setBackupEnabled(refContainerBackupEnabled)
        .setNamedBlobMode(Container.NamedBlobMode.OPTIONAL)
        .setUserMetadataKeysToNotPrefixInResponse(Collections.singleton(refUserMetadataKeyToNotPrefix))
        .setCacheTtlInSecond(refCacheTtlInSecond)
        .build();
  }
Creates and returns a random {@link Container} for {@code accountId}.
@param accountId the account id for the container
@return returns a random {@link Container} for {@code accountId}
ambry-test-utils/src/main/java/com/github/ambry/account/InMemAccountService.java