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);

    }
}
@@ -82,76 +82,10 @@
 JAXB
-Context;%0Aimport javax.xml.bind.Marshaller;%0A%0Aimport org.junit.Before
 ;
+%0A
 %0Aimp
@@ -182,429 +182,139 @@
     
-private JAXBContext context;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        this.context = JAXBContext.newInstance(Config.class);%0A%0A%0A    %7D%0A%0A    @Test%0A    public void serialization() throws Exception %7B%0A        Marshaller marshaller = this.context.createMarshaller();%0A        Config config = new Config();%0A        File file = new File(%22target/configuration.xml%22);%0A        marshaller.marshal(config, file
+@Test%0A    public void serialization() throws Exception %7B%0A        JAXB.marshal(new Config(), new File(%22target/configuration.xml%22)
 );%0A
-%0A
     

Simplify test