Added system property for test
Fixed test code