Added conditional return of empty array versus hard-coded OpenBrace
Extracted common structure in tests