### Question:
FixedWidthConfigurationReader { public FixedWidthConfiguration readFromSasFormatFile(String encoding, Resource resource, boolean failOnInconsistentLineWidth) { final List<FixedWidthColumnSpec> columnSpecs = new ArrayList<>(); final CsvDataContext dataContext = new CsvDataContext(resource, new CsvConfiguration()); final Table table = dataContext.getDefaultSchema().getTable(0); try (final DataSet dataSet = dataContext.query().from(table).select("Name", "BeginPosition", "EndPosition") .execute()) { while (dataSet.next()) { final String name = (String) dataSet.getRow().getValue(0); final int beginPosition = Integer.parseInt((String) dataSet.getRow().getValue(1)); final int endPosition = Integer.parseInt((String) dataSet.getRow().getValue(2)); final int width = 1 + endPosition - beginPosition; columnSpecs.add(new FixedWidthColumnSpec(name, width)); } } return new FixedWidthConfiguration(encoding, columnSpecs, failOnInconsistentLineWidth); }  FixedWidthConfiguration readFromSasFormatFile(String encoding, Resource resource,
            boolean failOnInconsistentLineWidth); FixedWidthConfiguration readFromSasInputDefinition(String encoding, Resource resource,
            boolean failOnInconsistentLineWidth);  }### Answer:
@Test public void testReadConfigurationFromSasFormatFile() throws Exception { final FixedWidthConfigurationReader reader = new FixedWidthConfigurationReader(); final Resource resource = new FileResource("src/test/resources/metadata_spec1/sas-formatfile-metadata.txt"); assertTrue(resource.isExists()); final FixedWidthConfiguration configuration = reader.readFromSasFormatFile("UTF8", resource, false); assertEquals("[1, 20, 2]", Arrays.toString(configuration.getValueWidths())); final FixedWidthDataContext dataContext = new FixedWidthDataContext(dataResource, configuration); performAssertionsOnSpec1(dataContext); }