tests for attributes and json serialization