Test automation identity

Added test for checking that user cannot be created with user of already existing user with same username. Also did some refactoring
I would not add assertions here