tests constructor and toString