public static byte[] encode(Predicate predicate) {
        Objects.requireNonNull(predicate, "predicate");
        Slime slime = new Slime();
        encode(predicate, slime.setObject());
        return com.yahoo.slime.BinaryFormat.encode(slime);
    }
@Test
    void requireThatEncodeNullThrows() {
        try {
            BinaryFormat.encode(null);
            fail();
        } catch (NullPointerException e) {
            assertEquals("predicate", e.getMessage());
        }
    }