@Test
@Ignore
public void testMarshal() throws FileNotFoundException, JAXBException, IOException, Exception {

    TramoSpecification spec = TramoSpecification.TRfull;
    EstimateSpec espec = spec.getEstimate().clone();
    espec.setUbp(1);
    TsPeriodSelector sel = new TsPeriodSelector();
    sel.last(120);
    espec.setSpan(sel);
    XmlEstimationSpec xspec = XmlEstimationSpec.MARSHALLER.marshal(espec);
    JAXBContext jaxb = JAXBContext.newInstance(xspec.getClass());
    FileOutputStream ostream = new FileOutputStream(FILE);
    try (OutputStreamWriter writer = new OutputStreamWriter(ostream, StandardCharsets.UTF_8)) {
        Marshaller marshaller = jaxb.createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
        marshaller.marshal(xspec, writer);
        writer.flush();
    }
    XmlEstimationSpec rslt;
    FileInputStream istream = new FileInputStream(FILE);
    try (InputStreamReader reader = new InputStreamReader(istream, StandardCharsets.UTF_8)) {
        Unmarshaller unmarshaller = jaxb.createUnmarshaller();
        rslt = (XmlEstimationSpec) unmarshaller.unmarshal(reader);
        EstimateSpec nspec = new EstimateSpec();
        XmlEstimationSpec.UNMARSHALLER.unmarshal(rslt, nspec);
        assertTrue(nspec.equals(espec));
    }
}