Change import order

Import standard packages first
Don't use naked asserts in tests
Style fix: No spaces around equals sign