A junit rule to ease TCP integration tests