testing the creating of objects by encode