Discussion integration tests

Needs another review please...
Way too big if condition statement. Suggest to extract to method and give a descriptive name.