@Test
    public void testWriteObject() {
        List<Card> cardsToWrite = new ArrayList<Card>();
        cardsToWrite.add(new Card(Suit.CLUB, Rank.ACE));
        cardsToWrite.add(new Card(Suit.SPADE, Rank.TEN));
        
        String fileName = "test/filehandling/testcardlist.dat";
        
        assertTrue("Writing failed!", writer.writeObject(cardsToWrite, fileName));
        // Reading the object to see that it is correctly saved
        Object readObject = reader.readObject(fileName);
        
        assertNotNull("Reading failed!", readObject);
        
        List<Card> readCards = null;
        try {
            readCards = (List<Card>) readObject;
        } catch (ClassCastException e) {
            fail("The read object was not of the correct type!");
        }
        
        assertEquals("The read card list was not equal to the saved one!", 
                cardsToWrite, readCards);
    }