EntityDescriptor extends Descriptor { @Override public EntityDescriptor setLanguage(String languageTag) { super.setLanguage(languageTag); fieldDescriptors.values().forEach(d -> d.setLanguage(languageTag)); return this; } EntityDescriptor();  EntityDescriptor(boolean assertionsInSubjectContext);  EntityDescriptor(URI context);  EntityDescriptor(URI context, boolean assertionsInSubjectContext); @Override EntityDescriptor addAttributeDescriptor(Field attribute, Descriptor descriptor); @Override EntityDescriptor addAttributeContext(Field attribute, URI context); @Override EntityDescriptor setLanguage(String languageTag); @Override EntityDescriptor setAttributeLanguage(Field attribute, String languageTag); @Override Descriptor getAttributeDescriptor(FieldSpecification<?, ?> attribute); @Override URI getAttributeContext(FieldSpecification<?, ?> attribute); @Override Collection<Descriptor> getAttributeDescriptors(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test void hasLanguageReturnsTrueForLanguageSetExplicitlyToNull() { final Descriptor descriptor = new EntityDescriptor(); assertFalse(descriptor.hasLanguage()); descriptor.setLanguage(null); assertTrue(descriptor.hasLanguage()); assertNull(descriptor.getLanguage()); }