test to convert model to entity