TOKYO - The foreign and defense ministers of Japan and Germany agreed Tuesday to work closely toward establishing a rules-based order in the Indo-Pacific, in an apparent bid to counter China's increasing assertiveness in the region's waters.