### Question:
DueDateExtensionUtils { public static void setValue( @Nonnull IBaseHasExtensions resource, @Nullable Date date, @Nonnull Function<String, IElement> typeFactory ) { BaseExtensionUtils.setDateValue( URL, resource, date, typeFactory ); } private  DueDateExtensionUtils(); static void setValue( @Nonnull IBaseHasExtensions resource, @Nullable Date date, @Nonnull Function<String, IElement> typeFactory ); @Nullable static Date getValue( @Nonnull IBaseHasExtensions resource ); static final String URL; }### Answer:
@Test public void resetValue() { TestPlanDefinition planDefinition = new TestPlanDefinition(); DueDateExtensionUtils.setValue( planDefinition, new Date(), TypeFactory::createType ); DueDateExtensionUtils.setValue( planDefinition, null, TypeFactory::createType ); Assert.assertTrue( planDefinition.getExtension().isEmpty() ); }
@Test public void setValue() { TestPlanDefinition planDefinition = new TestPlanDefinition(); final Date date = new Date(); DueDateExtensionUtils.setValue( planDefinition, date, TypeFactory::createType ); Assert.assertEquals( 1, planDefinition.getExtension().size() ); Assert.assertEquals( DueDateExtensionUtils.URL, planDefinition.getExtension().get( 0 ).getUrl() ); Assert.assertSame( date, ( (DateDt) planDefinition.getExtension().get( 0 ).getValue() ).getValue() ); }