Gson creates file .attach_pid when run as JUnitTestcase

I got this testcase

@Test void writeDebug() {    Container container = new Container("someString", "someOtherString",                                         new Debug("this is a debug test"));    container.createContainer(container, "test/testDebugContainer");  } 

When I run the two lines within my mainmethodor as a JUnitTest, a .json is created. But when I run it as a JUnitTest, then there is also an empty file created in my $ WORKING_DIR, by the name of .attach_pid . I wonder why that is.

The used IDE is IntelliJ IDEA.

I already checked, that when I comment out all test successively, they all create this file. The int-value varies. It is not produced when the only testcase is something simple as System.out.print(“test”);

This is the method that created the .json-file:

public void createContainer(Container container, String filename) {      Gson gson = new GsonBuilder().serializeNulls().create();     String json = gson.toJson(container);      try {         FileWriter writer = new FileWriter("json/"+filename+".json");         writer.write(json);         writer.flush();         writer.close();     } catch (IOException e) {         e.printStackTrace();     } } 

Additionally, if the code is up anyway, I like to hear enhancements for it, too.