Germany is one of several nations with ships patrolling the pirate-infested waters off Somalia .