### Question:
MapTileCollisionModel extends FeatureAbstract implements MapTileCollision { @Override public CollisionResult computeCollision(Transformable transformable, CollisionCategory category) { return computer.computeCollision(map, this::getCollisionFormulas, transformable, category); } MapTileCollisionModel(); @Override void prepare(FeatureProvider provider); @Override void loadCollisions(Media collisionFormulas, Media collisionGroups); @Override void loadCollisions(CollisionFormulaConfig formulasConfig, CollisionGroupConfig groupsConfig); @Override void saveCollisions(); @Override CollisionResult computeCollision(Transformable transformable, CollisionCategory category); @Override CollisionFormula getCollisionFormula(String name); @Override CollisionGroup getCollisionGroup(String name); @Override Collection<CollisionFormula> getCollisionFormulas(Tile tile); @Override Collection<CollisionFormula> getCollisionFormulas(); @Override Collection<CollisionGroup> getCollisionGroups(); @Override Media getFormulasConfig(); @Override Media getCollisionsConfig();  }### Answer:
@Test void testFromTop() { transformable.teleport(1.0, 3.0); transformable.moveLocation(1.0, 0.0, -2.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryY); assertNull(result.getX()); assertEquals(Double.valueOf(2.0), result.getY()); }
@Test void testFromTopFast() { transformable.teleport(1.0, 3.0); transformable.moveLocation(1.0, 0.0, -20.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryY); assertNull(result.getX()); assertEquals(Double.valueOf(2.0), result.getY()); }
@Test void testFromBottom() { transformable.teleport(1.0, -1.0); transformable.moveLocation(1.0, 0.0, 3.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryY); assertNull(result.getX()); assertEquals(Double.valueOf(0.0), result.getY()); }
@Test void testFromBottomFast() { transformable.teleport(1.0, -1.0); transformable.moveLocation(1.0, 0.0, 20.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryY); assertNull(result.getX()); assertEquals(Double.valueOf(0.0), result.getY()); }
@Test void testFromLeft() { transformable.teleport(-1.0, 0.0); transformable.moveLocation(1.0, 2.0, 0.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryX); assertNull(result.getY()); assertEquals(Double.valueOf(0.0), result.getX()); }
@Test void testFromLeftFast() { transformable.teleport(-1.0, 0.0); transformable.moveLocation(1.0, 20.0, 0.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryX); assertNull(result.getY()); assertEquals(Double.valueOf(0.0), result.getX()); }
@Test void testFromRight() { transformable.teleport(2.0, 0.0); transformable.moveLocation(1.0, -1.0, 0.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryX); assertNull(result.getY()); assertEquals(Double.valueOf(2.0), result.getX()); }
@Test void testFromRightFast() { transformable.teleport(2.0, 0.0); transformable.moveLocation(1.0, -20.0, 0.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryX); assertNull(result.getY()); assertEquals(Double.valueOf(2.0), result.getX()); }
@Test void testNoCollision() { transformable.teleport(6.0, 6.0); transformable.moveLocation(1.0, 1.0, 1.0); final CollisionResult result = mapCollision.computeCollision(transformable, categoryX); assertNull(result); }