improving code style in tests