Cache processed result in test
Re-use white spaces regexp
Wrap long condition