Added tests for conditional branches and code update due to tests` fails