@Test
  void copyIsUnmodifiable() {
    // Arrange
    Map<String, Collection<String>> sourceMap = new HashMap<>();

    sourceMap.put("First", Arrays.asList("abc", "qwerty", "xyz"));
    sourceMap.put("camelCase", Collections.singleton("123"));
    // Act
    Map<String, Collection<String>> unmodifiableMap = caseInsensitiveCopyOf(sourceMap);
    // Assert result
    assertThatThrownBy(() -> unmodifiableMap.put("new", Collections.singleton("223322")))
        .isInstanceOf(UnsupportedOperationException.class);
    assertThatThrownBy(() -> unmodifiableMap.get("camelCase").clear())
        .isInstanceOf(UnsupportedOperationException.class);
  }
Ex. your {@code Foo} object would be null, but so would things like Number.
core/src/test/java/feign/UtilTest.java