I want to disable the network for testing like this solution in c#: How to simulate network failure for test purposes (in C#)? It suggests setting the ip to a bogus static address. How can I set the ip from Java or Groovy?
This solution is for windows. I'm using Mac.