Java Simulation for detecting a Sink Node in a WSN