@Override
    protected void doLoadTestData(StdConverter.Operation oper, File dir) throws Exception
    {
        /* First of all, read in all the data, bind to in-memory object(s),
         * and then (if read test), convert to the specific type converter
         * uses.
         */
        byte[] readBuffer = new byte[DEFAULT_BUF_SIZE];
        ByteArrayOutputStream tmpStream = new ByteArrayOutputStream(DEFAULT_BUF_SIZE);
        _totalLength = 0;

        File[] files = dir.listFiles(new FilenameFilter() {
            @Override
            public boolean accept(File dir, String name) {
                return name.endsWith(".jsn");
            }
        });

        StdConverter<TwitterSearch> stdConverter = getStdConverter();
        _readableData = (oper == StdConverter.Operation.WRITE) ?
            null : new byte[files.length][];
        _writableData = (oper == StdConverter.Operation.WRITE) ?
            new TwitterSearch[files.length] : null;

        if (files.length == 0) {
            throw new IllegalStateException("No JSON twitter files found from: "+dir);
        }
            
        for (int i = 0, len = files.length; i < len; ++i) {
            File f = files[i];
            // Read file contents, bind to in-memory object (using std conv)
            readAll(f, readBuffer, tmpStream);
            byte[] fileData = tmpStream.toByteArray();
            TwitterSearch origData = (TwitterSearch) stdConverter.readData(new TestByteArrayInputStream(fileData));
            if (_writableData != null) {
                _writableData[i] = origData;
            }

            /* Then we better verify that we can round-trip content from
             * object to native format and back: and if it comes back
             * equal to original data, we are good to go.
             */

            tmpStream.reset();
            _converter.writeData(tmpStream, origData);
            byte[] convData = tmpStream.toByteArray();
            if (convData == null) {
                throw new IllegalStateException("Empty output for "+_converter.getClass().getName());
            }
            
            if (_readableData != null) {
                _readableData[i] = convData;
            }
            TwitterSearch convResults = (TwitterSearch)_converter.readData(new TestByteArrayInputStream(convData));
            if (convResults == null) {
                throw new IllegalStateException("Missing converted results for "+_converter.getClass().getName());
            }
            if (!convResults.equals(origData)) {
                // Not very clean, but let's output for debugging:
                System.err.println("Incorrect mapping");
                System.err.println("Source doc: ["+new String(fileData, "UTF-8")+"]");
                System.err.println("Using "+_converter+": ["+new String(convData, "UTF-8")+"]");
                throw new IllegalStateException("Item #"+i+"/"+len+" differs for '"+_converter+"'");
            }
        }
    }