Location extends Vector3Impl { public Location setY(double y) { return new Location(extent, this.withY(y), yaw, pitch); } Location(Extent extent);  Location(Extent extent, double x, double y, double z);  Location(Extent extent, Vector3 position);  Location(Extent extent, double x, double y, double z, Vector3 direction);  Location(Extent extent, double x, double y, double z, float yaw, float pitch);  Location(Extent extent, Vector3 position, Vector3 direction);  Location(Extent extent, Vector3 position, float yaw, float pitch); Extent getExtent(); Location setExtent(Extent extent); float getYaw(); Location setYaw(float yaw); float getPitch(); Location setPitch(float pitch); Location setDirection(float yaw, float pitch); Vector3 getDirection(); Direction getDirectionEnum(); Location setDirection(Vector3 direction); Vector3 toVector(); Location setX(double x); Location setY(double y); Location setZ(double z); Location setPosition(Vector3 position); @Override Location clampY(int min, int max); @Override boolean equals(Object o);  }
@Test public void testSetY() throws Exception { World world = mock(World.class); Location location1 = new Location(world, Vector3.ZERO); Location location2 = location1.setY(TEST_VALUE); assertEquals(0, location1.getY(), EPSILON); assertEquals(0, location2.getX(), EPSILON); assertEquals(TEST_VALUE, location2.getY(), EPSILON); assertEquals(0, location2.getZ(), EPSILON); }