public static <T> MutationDetector forValueWithCoder(T value, Coder<T> coder)
      throws CoderException {
    if (value == null) {
      return noopMutationDetector();
    } else {
      return new CodedValueMutationDetector<>(value, coder);
    }
  }
@Test
  public void testMutatingArray() throws Exception {
    byte[] value = new byte[] {0x1, 0x2, 0x3, 0x4};
    MutationDetector detector = MutationDetectors.forValueWithCoder(value, ByteArrayCoder.of());
    value[0] = 0xa;
    thrown.expect(IllegalMutationException.class);
    detector.verifyUnmodified();
  }