Junit test failing when running gradle build

I have a Junit test that runs perfectly fine using Eclipse > Junit > Run option.
But the same test fails when running via Gradle build.

I am using Hamcrest matcher to assert the results.

Any helpful suggestions are welcome.

Thanks.