### Question:
ProtoUtils { public static <M extends MessageLiteOrBuilder> List<M> filter(List<M> objs, Predicate<M> filter) { checkNotNull(filter); for (int i = 0; i < objs.size(); ++i) { if (!filter.test(objs.get(i))) { return filterFrom(objs, filter, i); } } return objs; } private  ProtoUtils(); static List<M> filter(List<M> objs, Predicate<M> filter);  }### Answer:
@Test public void testFilter() { ImmutableList<AdSlot> adslots = ImmutableList.of( AdSlot.newBuilder().setId(1).build(), AdSlot.newBuilder().setId(2).build(), AdSlot.newBuilder().setId(3).build()); assertThat(ProtoUtils.filter(adslots, adslot -> adslot.getId() >= 2)).hasSize(2); assertThat(ProtoUtils.filter(adslots, adslot -> true)).isSameInstanceAs(adslots); assertThat(ProtoUtils.filter(adslots, adslot -> false)).isEmpty(); }