### Question:
EventStatusExtensionUtils { @Nullable public static EventStatus getValue( @Nonnull IBaseHasExtensions resource ) throws IllegalArgumentException { final String stringValue = BaseExtensionUtils.getStringValue( URL, resource ); if ( stringValue == null ) { return null; } try { return EventStatus.valueOf( stringValue ); } catch ( IllegalArgumentException e ) { throw new IllegalArgumentException( "Invalid event status: " + stringValue ); } } private  EventStatusExtensionUtils(); static void setValue( @Nonnull IBaseHasExtensions resource, @Nullable EventStatus eventStatus, @Nonnull Function<String, IElement> typeFactory ); @Nullable static EventStatus getValue( @Nonnull IBaseHasExtensions resource ); static final String URL; }### Answer:
@Test public void getValue() { TestPlanDefinition planDefinition = new TestPlanDefinition(); EventStatusExtensionUtils.setValue( planDefinition, EventStatus.OVERDUE, TypeFactory::createType ); Assert.assertEquals( EventStatus.OVERDUE, EventStatusExtensionUtils.getValue( planDefinition ) ); }
@Test( expected = IllegalArgumentException.class ) public void getValueInvalid() { TestPlanDefinition planDefinition = new TestPlanDefinition(); BaseExtensionUtils.setStringValue( EventStatusExtensionUtils.URL, planDefinition, "ABC", TypeFactory::createType ); EventStatusExtensionUtils.getValue( planDefinition ); }