### Question:
FieldModel extends Config { public void putField(final String key, final FieldValueModel field) { keyToValues.put(key, field); } private  FieldModel();  FieldModel(String descriptorName, String context, Map<String, FieldValueModel> keyToValues);  FieldModel(String configId, String descriptorName, String context, Map<String, FieldValueModel> keyToValues);  FieldModel(String descriptorName, String context, String createdAt, String lastUpdated, Map<String, FieldValueModel> keyToValues);  FieldModel(String configId, String descriptorName, String context, String createdAt, String lastUpdated, Map<String, FieldValueModel> keyToValues); String getDescriptorName(); String getContext(); String getCreatedAt(); String getLastUpdated(); Map<String, FieldValueModel> getKeyToValues(); void setKeyToValues(final Map<String, FieldValueModel> keyToValues); Optional<FieldValueModel> getFieldValueModel(final String key); Optional<String> getFieldValue(final String key); void putField(final String key, final FieldValueModel field); void removeField(final String key); FieldModel fill(final FieldModel fieldModel);  }### Answer:
@Test public void putFieldTest() { String descriptor = "description1"; String context = "context1"; String key = "Key1"; String newKey = "Key2"; FieldValueModel testFieldValueModel = Mockito.mock(FieldValueModel.class); Map<String, FieldValueModel> keyToValues = new HashMap<>(); keyToValues.put(key, testFieldValueModel); FieldModel testFieldModel = new FieldModel(descriptor, context, keyToValues); assertTrue(testFieldModel.getKeyToValues().containsKey(key)); assertFalse(testFieldModel.getKeyToValues().containsKey(newKey)); testFieldModel.putField(newKey, testFieldValueModel); assertTrue(testFieldModel.getKeyToValues().containsKey(key)); assertTrue(testFieldModel.getKeyToValues().containsKey(newKey), "The newKey was not successfully added into the testFieldModel."); }