type for entityId included in response + JSON func tests implemented
fixed func tests that stopped working after a bugfix