public static byte[] makeDocsum() {
        Slime slime = new Slime();
        Cursor docsum = slime.setObject();
        docsum.setString("TOPIC", "Arts/Celebrities/Madonna");
        docsum.setString("TITLE", "StudyOfMadonna.com - Interviews, Articles, Reviews, Quotes, Essays and more..");
        docsum.setString("DYNTEASER", "dynamic teaser");
        docsum.setLong("EXTINFOSOURCE", 1);
        docsum.setLong("LANG1", 10);
        docsum.setLong("WORDS", 352);
        docsum.setLong("BYTES", 9190);
        byte[] tmp = BinaryFormat.encode(slime);
        ByteBuffer buf = ByteBuffer.allocate(tmp.length + 4);
        buf.order(ByteOrder.LITTLE_ENDIAN);
        buf.putInt(DocsumDefinitionSet.SLIME_MAGIC_ID);
        buf.order(ByteOrder.BIG_ENDIAN);
        buf.put(tmp);
        return buf.array();
    }
Tests docsum class functionality

@author bratseth
container-search/src/test/java/com/yahoo/prelude/fastsearch/DocsumDefinitionTestCase.java