### Question:
BaseExtensionUtils { @Nullable protected static Date getDateValue( @Nonnull String url, @Nonnull IBaseHasExtensions resource ) { final IBaseDatatype value = getValue( url, resource ); if ( value instanceof IPrimitiveType ) { final Object primitiveValue = ( (IPrimitiveType) value ).getValue(); if ( primitiveValue instanceof Date ) { return (Date) primitiveValue; } } return null; } private  BaseExtensionUtils();   }### Answer:
@Test public void getDateValue() { TestPlanDefinition planDefinition = new TestPlanDefinition(); final Date date = new Date(); BaseExtensionUtils.setDateValue( "testUrl", planDefinition, new Date(), TypeFactory::createType ); Assert.assertEquals( date, BaseExtensionUtils.getDateValue( "testUrl", planDefinition ) ); }