### Question:
CapabilityLanguageFlowController extends CasFlowController_ImplBase { public static FlowControllerDescription getDescription() { FlowControllerDescription desc = getResourceSpecifierFactory().createFlowControllerDescription(); desc.setImplementationName(CapabilityLanguageFlowController.class.getName()); ProcessingResourceMetaData metaData = desc.getFlowControllerMetaData(); metaData.setName("Capability Language Flow Controller"); metaData.setDescription("Simple FlowController that uses a linear fow but may skip\n" + "\t\tsome of the AEs in the flow if they do not handle the language\n" + "\t\tof the current document or if their outputs have already been\n" + "\t\tproduced by a previous AE in the flow."); metaData.setVendor("The Apache Software Foundation"); metaData.setVersion("1.0"); Capability capability = getResourceSpecifierFactory().createCapability(); metaData.setCapabilities(new Capability[] { capability }); return desc; }  void initialize(FlowControllerContext aContext); Flow computeFlow(CAS aCAS); static FlowControllerDescription getDescription(); Map<String, ResultSpecification> getLastResultSpecForComponent();  }### Answer:
@Test public void thatGeneratedDefaultFlowDescriptionIsEqualToXmlDescription() throws Exception { FlowControllerDescription desc1 = CapabilityLanguageFlowController.getDescription(); FlowControllerDescription desc2 = getXMLParser().parseFlowControllerDescription( new XMLInputSource("src/test/resources/CapabilityLanguageFlowControllerTest/CapabilityLanguageFlowController.xml")); StringWriter desc1Writer = new StringWriter(); desc1.toXML(desc1Writer); StringWriter desc2Writer = new StringWriter(); desc2.toXML(desc2Writer); assertThat(desc2.toString()).isEqualTo(desc1.toString()); }
@Test public void thatChangesToDefaultFlowControllerDoNotCarryOver() throws Exception { FlowControllerDescription desc1 = CapabilityLanguageFlowController.getDescription(); desc1.setImplementationName("otherImplementation"); desc1.getMetaData().setName("otherName"); FlowControllerDescription desc2 = CapabilityLanguageFlowController.getDescription(); assertThat(desc2.getImplementationName()).isEqualTo(CapabilityLanguageFlowController.class.getName()); assertThat(desc2.getMetaData().getName()).isEqualTo("Capability Language Flow Controller"); }