### Question:
MapRecord implements MutableRecord { @Override public boolean updateValue(String field, Value old_value, Value new_value) { if (!records.containsKey(field) || !records.get(field).contains(old_value)) { return false; } int idx = records.get(field).indexOf(old_value); records.get(field).set(idx, new_value); return true; } MapRecord(); @Override List<Value> getValues(String field); @Override MutableRecord makeMutable(); @Override boolean isMutable(); @Override boolean addField(String field, List<Value> values); @Override boolean addValue(String field, Value value); @Override boolean removeField(String field); @Override boolean removeValue(String field, Value value); @Override boolean updateField(String field, List<Value> value); @Override boolean updateValue(String field, Value old_value, Value new_value); @Override boolean hasField(String field); @Override Set<String> getFields();  }### Answer:
@Test public void testUpdateValue() { Value value = new StringValue("baz"); assertFalse(rec.updateValue("test", val.get(0), value)); rec.addField("test", val); assertTrue(rec.updateValue("test", val.get(0), value)); assertEquals(value, rec.getValues("test").get(0)); }