package org.eann.sim.configuration;

import java.io.File;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;

import org.junit.Before;
import org.junit.Test;

/**
 * Created by martin on 17.03.17.
 */
public class ConfigTest {

    private JAXBContext context;

    @Before
    public void setUp() throws Exception {
        this.context = JAXBContext.newInstance(Config.class);


    }

    @Test
    public void serialization() throws Exception {
        Marshaller marshaller = this.context.createMarshaller();
        Config config = new Config();
        File file = new File("target/configuration.xml");
        marshaller.marshal(config, file);

    }
}
package org.eann.sim.configuration;

import java.io.File;

import javax.xml.bind.JAXB;

import org.junit.Test;

/**
 * Created by martin on 17.03.17.
 */
public class ConfigTest {

    @Test
    public void serialization() throws Exception {
        JAXB.marshal(new Config(), new File("target/configuration.xml"));
    }
}
Simplify test