@Override
  @SuppressWarnings("BanSerializableRead")
  protected Object deserialize(byte[] data, ClassLoader classLoader) {
    try (var bytes = new ByteArrayInputStream(data);
         var input = newInputStream(bytes, classLoader)) {
      return input.readObject();
    } catch (IOException e) {
      throw new CacheException("Failed to deserialize", e);
    } catch (ClassNotFoundException e) {
      throw new CacheException("Failed to resolve a deserialized class", e);
    }
  }
@Test(dataProvider = "copier")
  public void deserializable_badData(JavaSerializationCopier copier) {
    assertThrows(CacheException.class, () ->
        copier.deserialize(new byte[0], Thread.currentThread().getContextClassLoader()));
  }