EntityNavigationManager em = Singleton.get().getNavManager();
TiledNavMesh n1 = getNavMesh("0/0", Vector3f.ZERO);
em.attachMesh(n1);
TiledNavMesh n2 = getNavMesh(""+IArea.TERRAIN_SIZE+"/0", new Vector3f(IArea.TERRAIN_SIZE,0,0));
em.attachMesh(n2);
TiledNavMesh n3 = getNavMesh("0/-"+IArea.TERRAIN_SIZE, new Vector3f(0,0,-IArea.TERRAIN_SIZE));
em.attachMesh(n3);
TiledNavMesh n11 = em.getNavMesh(10,10);
System.out.println("Navmesh with 10/10 in it is:"+n11+" ? 0/0 ?");
assertEquals(n1, n11);
TiledNavMesh n22 = em.getNavMesh(IArea.TERRAIN_SIZE+10,10);
System.out.println("Navmesh with "+(IArea.TERRAIN_SIZE+10)+"/10 in it is:"+n22+" ? "+IArea.TERRAIN_SIZE+"/0 ?");
assertEquals(n2, n22);
TiledNavMesh n33 = em.getNavMesh(10,-IArea.TERRAIN_SIZE+10);
System.out.println("Navmesh with 10/-"+(IArea.TERRAIN_SIZE+10)+" in it is:"+n33+" ? 0/-"+IArea.TERRAIN_SIZE+" ?");
assertEquals(n3, n33);
TiledNavMesh n44 = em.getNavMesh(10,10);
assertEquals(n11, n44);
Vector3f sPos = new Vector3f(10,0,10);
Vector3f ePos = new Vector3f(30,0,30);
Path p = null;
p= NavTestHelper.findPath(em, sPos, ePos);
assertNotNull(p);//path inside tile
assertTrue(NavTestHelper.areCellsConnected(p));
sPos = new Vector3f(10,0,-10);
ePos = new Vector3f(30,0,30);
p =NavTestHelper.findPath(em, sPos, ePos);//path inside tile
assertNotNull(p);
assertTrue(NavTestHelper.areCellsConnected(p));
assertNotNull(NavTestHelper.walkPath(em, sPos, ePos, 4f));
assertNull(NavTestHelper.findPath(em, sPos, new Vector3f(0,0,IArea.TERRAIN_SIZE+1)));//target is no tile
assertNotNull(NavTestHelper.findPath(em, sPos, new Vector3f(0,0,IArea.TERRAIN_SIZE-1)));//crossing from one to the other
assertNull(NavTestHelper.findPath(em, new Vector3f(-IArea.TERRAIN_SIZE_HALF,0,0), new Vector3f(IArea.TERRAIN_SIZE_HALF,0,1)));//target further way than tile side length, should fail
}