public static Predicate decode(byte[] buf) {
        Objects.requireNonNull(buf, "buf");
        Slime slime = com.yahoo.slime.BinaryFormat.decode(buf);
        return decode(slime.get());
    }
@Test
    void requireThatDecodeEmptyThrows() {
        try {
            BinaryFormat.decode(new byte[0]);
            fail();
        } catch (UnsupportedOperationException e) {
            assertEquals("0", e.getMessage());
        }
    }