ConfigurationUnits implements Iterable<ConfigurationUnit>, Serializable { public ConfigurationUnits(final Class configurationClass, ConfigurationUnit... configurationUnits) { this(configurationClass, Sets.<ConfigurationUnit>newLinkedHashSet(Arrays.asList(configurationUnits))); } ConfigurationUnits(final Class configurationClass, ConfigurationUnit... configurationUnits);  ConfigurationUnits(final Class configurationClass, final Set<ConfigurationUnit> configurationUnits);  ConfigurationUnits(final String configurationClassName, final Class domainType, final Set<ConfigurationUnit> configurationUnits); @Override Iterator<ConfigurationUnit> iterator(); String getConfigurationClassName(); Class<?> getDomainType(); ConfigurationUnit forDomainUnitType(DomainConfigurationUnitType domainConfigurationUnitType); FiltersConfigurationUnit getFilters(); ScopesConfigurationUnit getScopes(); SidebarsConfigurationUnit getSidebars(); FieldSetConfigurationUnit getListViewConfigurationUnit(); ScreenContextConfigurationUnit getScreenContext(); EntityMetadataConfigurationUnit getEntityConfiguration(); FieldSetConfigurationUnit getShowViewConfigurationUnit(); FieldSetConfigurationUnit getFormViewConfigurationUnit(); FieldSetConfigurationUnit getQuickViewConfigurationUnit();  }
@Test(expected = IllegalArgumentException.class) public void nullConfigurationClassNotAllowed() throws Exception { configurationUnits(null); }
@Test public void unitsOrderTheSameAsInitial() throws Exception { final ConfigurationUnits testee = configurationUnits(DomainTypeConfiguration.class, configurationUnitsFor(FILTERS, CONFIGURATION, SCOPES)); assertUnitsOrderEqual(testee, new DomainConfigurationUnitType[]{FILTERS, CONFIGURATION, SCOPES}); }