### Question:
Metadata { public <T> Iterable<T> removeAll(Key<T> key) { if (isEmpty()) { return null; } int writeIdx = 0; int readIdx = 0; List<T> ret = null; for (; readIdx < size; readIdx++) { if (bytesEqual(key.asciiName(), name(readIdx))) { ret = ret != null ? ret : new ArrayList<T>(); ret.add(key.parseBytes(value(readIdx))); continue; } name(writeIdx, name(readIdx)); value(writeIdx, value(readIdx)); writeIdx++; } int newSize = writeIdx; Arrays.fill(namesAndValues, writeIdx * 2, len(), null); size = newSize; return ret; } Metadata(byte[]... binaryValues);   Metadata(int usedNames, byte[]... binaryValues);  Metadata(); boolean containsKey(Key<?> key); @Nullable T get(Key<T> key); @Nullable Iterable<T> getAll(final Key<T> key); @SuppressWarnings("deprecation") // The String ctor is deprecated, but fast. Set<String> keys(); void put(Key<T> key, T value); boolean remove(Key<T> key, T value); Iterable<T> removeAll(Key<T> key); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/4691") void discardAll(Key<T> key); void merge(Metadata other); void merge(Metadata other, Set<Key<?>> keys); @SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0 @Override String toString(); static final String BINARY_HEADER_SUFFIX; static final BinaryMarshaller<byte[]> BINARY_BYTE_MARSHALLER; static final AsciiMarshaller<String> ASCII_STRING_MARSHALLER; }### Answer:
@Test public void removeAllIgnoresMissingValue() { Metadata m = new Metadata(); Key<String> key = GrpcUtil.USER_AGENT_KEY; Iterable<String> removed = m.removeAll(key); assertNull(removed); }