HomePieceOfFurniture piece = new HomePieceOfFurniture(
catalog.getCategories().get(0).getFurniture().get(0));
home1.addPieceOfFurniture(piece);
// 2. Record home in a file named test.sh3d in current directory
HomeRecorder recorder = new HomeFileRecorder();
String testFile = new File("test.sh3d").getAbsolutePath();
recorder.writeHome(home1, testFile);
// Check test.sh3d file exists
assertTrue("File test.sh3d doesn't exist", recorder.exists(testFile));
// 3. Read test.sh3d file in a new home
Home home2 = recorder.readHome(testFile);
// Compare home content
assertNotSame("Home not loaded", home1, home2);
assertEquals("Home wall height",
home1.getWallHeight(), home2.getWallHeight());
assertEquals("Home walls wrong count",