private void loadAndCompare(Serializable test, String filename, boolean same) throws Exception {
        FileInputStream fis = new FileInputStream("src/resources/" + filename + ".dat");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object obj = ois.readObject();
        ois.close();
        if (same) {
            assertSame(test, obj);
        } else {
            assertEquals(test, obj);
        }
//        try {
//            fis = new FileInputStream("./resources/" + filename + "2.dat");
//            ois = new ObjectInputStream(fis);
//            obj = ois.readObject();
//            ois.close();
//            if (same) {
//                assertSame(test, obj);
//            } else {
//                assertEquals(test, obj);
//            }
//        } catch (FileNotFoundException ex) {
//            // ignore
//        }
    }