Avoid calling InetAddress.getLocalHost() that can be very slow. Exact connection or disconnection string isn't relevant for tests anyway.
Drop code with naive removing all anonymous classes. Breakpoints now works when inline call is in anonymous call.