    @Test(expected = ConfigException.class)
    public void marshalMaskedConfigThrowsIOException() throws Exception {

        Config config = mock(Config.class);
        OutputStream outputStream =
                mock(
                        OutputStream.class,
                        (iom) -> {
                            throw new IOException("");
                        });
        JaxbUtil.marshalMasked(config, outputStream);
    }