CompressParser implements ProxyContentParser.SubOptionParser { public CompressParser setAlgorithm(CompressAlgorithm algorithm) { this.algorithm = algorithm; return this; }  @Override String output(); @Override ProxyContentParser.SubOptionParser parse(String... subOption); @Override boolean isImportant(); CompressAlgorithm getAlgorithm(); CompressParser setAlgorithm(CompressAlgorithm algorithm);  }
@Test public void testSetAlgorithm() { String version = "3.0"; parser.setAlgorithm(new CompressAlgorithm() { @Override public String version() { return version; } @Override public AlgorithmType getType() { return AlgorithmType.ZSTD; } }); Assert.assertNotNull(parser.getAlgorithm()); Assert.assertEquals(version, parser.getAlgorithm().version()); }