private void assertEncryptionSettings(Container container, boolean encrypted, boolean previouslyEncrypted) {
    switch (Container.getCurrentJsonVersion()) {
      case Container.JSON_VERSION_1:
        assertEquals("encrypted wrong", ENCRYPTED_DEFAULT_VALUE, container.isEncrypted());
        assertEquals("previouslyEncrypted wrong", PREVIOUSLY_ENCRYPTED_DEFAULT_VALUE,
            container.wasPreviouslyEncrypted());
        break;
      case Container.JSON_VERSION_2:
        assertEquals("encrypted wrong", encrypted, container.isEncrypted());
        assertEquals("previouslyEncrypted wrong", previouslyEncrypted, container.wasPreviouslyEncrypted());
        break;
      default:
        throw new IllegalStateException("Unsupported version: " + Container.getCurrentJsonVersion());
    }
  }
Check the value of the encryption settings and json serde for a container.
@param container the {@link Container} to check.
@param encrypted the expected encrypted setting.
@param previouslyEncrypted the expected previouslyEncrypted setting.
ambry-api/src/test/java/com/github/ambry/account/AccountContainerTest.java