added equals() and hashcode() to plant and comonents.

allows checking if plants are the same for unit testing.
Also added unit test for serialising and deserialising plant.