public String compress(String compressorName, String uncompressedString) throws IOException {
    Checks.notNull(uncompressedString, "uncompressedString cannot be null");
    Compressor compressor =
        getCompressor(compressorName == null ? DEFAULT_COMPRESSOR_NAME : compressorName);
    return base64Encode(compressor.compress(uncompressedString.getBytes(DEFAULT_ENCODING)));
  }
@Test
  public void compressShouldThrowExceptionIfCompressorNotFound() {
    AssertHelper.assertThrows(
        "compress should throw exception if compressor not found",
        NullPointerException.class,
        "unknown compressorName: abcd",
        () -> stringCodec.compress("abcd", "testValue"));
  }