Added mocking example for java