### Question:
CameraRestrictedImpl implements Camera { @Override public void setPosition(float x, float y) { this.x = x; this.y = y; recalculatePosition(); } CameraRestrictedImpl();  CameraRestrictedImpl(float x, float y, float zoom, float angle);  CameraRestrictedImpl(float x, float y, float zoom, float angle, float width, float height, Rectangle worldBounds); void setWorldBounds(Rectangle rectangle); void setWorldBounds(float x1, float y1, float x2, float y2); void setBounds(float width, float height); @Override void setPosition(float x, float y); float getRealHeight(); float getRealWidth(); @Override float getX(); @Override float getY(); @Override void setZoom(float zoom); @Override float getZoom(); @Override void setAngle(float angle); @Override float getAngle();  }### Answer:
@Test public void testSetPosition() { CameraRestrictedImpl camera = new CameraRestrictedImpl(); camera.setBounds(8, 4); camera.setWorldBounds(0, 0, 20, 10); camera.setPosition(0f, 0f); assertThat(camera.getX(), IsEqual.equalTo(4f)); assertThat(camera.getY(), IsEqual.equalTo(2f)); camera.setPosition(20f, 0f); assertThat(camera.getX(), IsEqual.equalTo(16f)); assertThat(camera.getY(), IsEqual.equalTo(2f)); camera.setPosition(0f, 10f); assertThat(camera.getX(), IsEqual.equalTo(4f)); assertThat(camera.getY(), IsEqual.equalTo(8f)); camera.setPosition(20f, 10f); assertThat(camera.getX(), IsEqual.equalTo(16f)); assertThat(camera.getY(), IsEqual.equalTo(8f)); }