    @Test
    public void testDisableFeatureAutoCloseTarget()
            throws Exception
    {

        File tempFile = createTempFile();
        OutputStream out = new FileOutputStream(tempFile);
        MessagePackFactory messagePackFactory = new MessagePackFactory();
        ObjectMapper objectMapper = new ObjectMapper(messagePackFactory);
        objectMapper.configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false);
        List<Integer> integers = Arrays.asList(1);
        objectMapper.writeValue(out, integers);
        objectMapper.writeValue(out, integers);
        out.close();

        MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(new FileInputStream(tempFile));
        assertEquals(1, unpacker.unpackArrayHeader());
        assertEquals(1, unpacker.unpackInt());
        assertEquals(1, unpacker.unpackArrayHeader());
        assertEquals(1, unpacker.unpackInt());
    }