### Question:
LaxServiceProperties extends ServiceProperties { @Override public void afterPropertiesSet() { if (!dynamicServiceResolution) { super.afterPropertiesSet(); } else { Assert.hasLength(getArtifactParameter(), "artifactParameter cannot be empty."); Assert.hasLength(getServiceParameter(), "serviceParameter cannot be empty."); } } LaxServiceProperties();  LaxServiceProperties(boolean dynamicServiceResolution); @Override void afterPropertiesSet(); boolean isDynamicServiceResolution();  }### Answer:
@Test public void afterPropertiesSet_WithNullService_NoException() throws Exception { ServiceProperties serviceProperties = new LaxServiceProperties(); serviceProperties.setService(null); serviceProperties.afterPropertiesSet(); assertThat(serviceProperties.getService()).isNull(); }
@Test(expected = IllegalArgumentException.class) public void afterPropertiesSet_WithoutDynamicServiceResolutionValueAndNullOrEmptyService_IllegalArgumentException() throws Exception { LaxServiceProperties serviceProperties = new LaxServiceProperties(false); serviceProperties.afterPropertiesSet(); }