### Question:
JobProperties { public void put(final String key, final String value) { JobPropertiesEnum jobPropertiesEnum = JobPropertiesEnum.from(key); if (null == jobPropertiesEnum || null == value) { return; } map.put(jobPropertiesEnum, value); }  void put(final String key, final String value); String get(final JobPropertiesEnum jobPropertiesEnum); String json();  }### Answer:
@Test public void assertPutInvalidKey() throws NoSuchFieldException { JobProperties actual = new JobProperties(); actual.put("invalid_key", ""); Assert.assertTrue(getMap(actual).isEmpty()); }
@Test public void assertPutNullValue() throws NoSuchFieldException { JobProperties actual = new JobProperties(); actual.put(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey(), null); Assert.assertTrue(getMap(actual).isEmpty()); }
@Test public void assertPutSuccess() throws NoSuchFieldException { JobProperties actual = new JobProperties(); actual.put(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey(), DefaultJobExceptionHandler.class.getCanonicalName()); Assert.assertThat(getMap(actual).size(), Is.is(1)); }