@Override
    protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
        if (!this.expected.contains(desc.getName())) {
            throw new InvalidClassException("Unexpected deserialization ", desc.getName());
        }
        return super.resolveClass(desc);
    }
@Test
    public void testResolveClass() {
        List<SimplePojo> data = new ArrayList<>();
        data.add(new SimplePojo());
        try (ByteArrayOutputStream mem = new ByteArrayOutputStream();
                ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(mem))) {
            out.writeObject(data);
            out.flush();
            byte[] buf = mem.toByteArray();
            ByteArrayInputStream in = new ByteArrayInputStream(buf);
            ExpectedObjectInputStream instance = new ExpectedObjectInputStream(in, "java.util.ArrayList", "org.owasp.dependencycheck.utils.SimplePojo", "java.lang.Integer", "java.lang.Number");
            instance.readObject();
        } catch (IOException | ClassNotFoundException ex) {
            fail(ex.getMessage());
        }
    }