### Question:
ResourceMetaDataFactory { public static void configureResourceMetaData(ResourceMetaData aMetaData, Class<?> aComponentClass) { org.apache.uima.fit.descriptor.ResourceMetaData componentAnno = ReflectionUtil .getInheritableAnnotation(org.apache.uima.fit.descriptor.ResourceMetaData.class, aComponentClass); if (componentAnno == null) { aMetaData.setCopyright(getDefaultCopyright(aComponentClass)); aMetaData.setDescription(getDefaultDescription(aComponentClass)); aMetaData.setName(getDefaultName(aComponentClass)); aMetaData.setVendor(getDefaultVendor(aComponentClass)); aMetaData.setVersion(getDefaultVersion(aComponentClass)); } else { aMetaData.setCopyright(emptyAsNull(componentAnno.copyright())); aMetaData.setDescription(emptyAsNull(componentAnno.description())); aMetaData.setName(emptyAsNull(componentAnno.name())); aMetaData.setVendor(emptyAsNull(componentAnno.vendor())); aMetaData.setVersion(emptyAsNull(componentAnno.version())); } } private  ResourceMetaDataFactory(); static void configureResourceMetaData(ResourceMetaData aMetaData, Class<?> aComponentClass); static String getDefaultCopyright(Class<?> aComponentClass); static String getDefaultVersion(Class<?> aComponentClass); static String getDefaultDescription(Class<?> aComponentClass); static String getDefaultVendor(Class<?> aComponentClass); static String getDefaultName(Class<?> aComponentClass);  }### Answer:
@Test public void testWithMetaData() { org.apache.uima.resource.metadata.ResourceMetaData meta = UIMAFramework .getResourceSpecifierFactory().createResourceMetaData(); ResourceMetaDataFactory.configureResourceMetaData(meta, DummyComponent1.class); assertEquals("dummy", meta.getName()); assertEquals("1.0", meta.getVersion()); assertEquals("Just a dummy", meta.getDescription()); assertEquals("ASL 2.0", meta.getCopyright()); assertEquals("uimaFIT", meta.getVendor()); }
@Test public void testWithPartialMetaData() { org.apache.uima.resource.metadata.ResourceMetaData meta = UIMAFramework .getResourceSpecifierFactory().createResourceMetaData(); ResourceMetaDataFactory.configureResourceMetaData(meta, DummyComponent2.class); assertEquals("dummy", meta.getName()); assertEquals("1.0", meta.getVersion()); assertEquals(null, meta.getDescription()); assertEquals(null, meta.getCopyright()); assertEquals(null, meta.getVendor()); }