ExpandEndIndeterminate { public TimePeriod evaluate( final TimeGeometricPrimitive t ) { if ( t instanceof TimeInstant ) { return createPeriod( ( (TimeInstant) t ).getPosition() ); } if ( ( (TimePeriod) t ).getEndPosition().getIndeterminatePosition() == UNKNOWN ) { return (TimePeriod) t; } throw new IllegalArgumentException( "ExpandEndIndeterminate requires a time instant or a time period with indeterminate end" ); }  TimePeriod evaluate( final TimeGeometricPrimitive t );  }
@Test public void expandEndIndeterminatePeriodNormal() { expectedException.expect( IllegalArgumentException.class ); expectedException.expectMessage( "ExpandEndIndeterminate requires a time instant or a time period with indeterminate end" ); ad.evaluate( period( "00:00:02", "00:00:03" ) ); }
@Test public void expandEndIndeterminatePeriodIndeterminateBegin() { expectedException.expect( IllegalArgumentException.class ); expectedException.expectMessage( "ExpandEndIndeterminate requires a time instant or a time period with indeterminate end" ); ad.evaluate( period( null, "00:00:03" ) ); }