### Question:
SpatialUtils { public static Spatial convertToLocal(Spatial parent, Spatial child) { float x = child.getX(); float y = child.getY(); float angle = child.getAngle(); child.setPosition(x - parent.getX(), y - parent.getY()); child.setAngle(angle - parent.getAngle()); return child; }  static Spatial convertToLocal(Spatial parent, Spatial child); static Spatial convertToAbsolute(Spatial parent, Spatial child);  }### Answer:
@Test public void testConvertToLocalSpatial() { Spatial parent = new SpatialImpl(20, 50, 1f, 1f, 0f); Spatial child = new SpatialImpl(0f, 0f, 1f, 1f, 0f); SpatialUtils.convertToLocal(parent, child); assertThat(child.getX(), IsEqual.equalTo(-20f)); assertThat(child.getY(), IsEqual.equalTo(-50f)); }