unit tests for create method