### Question:
Parallax implements BackgroundComponent { public Parallax(SourceResolutionProvider source, Media media, int parallaxsNumber, int decX, int decY, int sx, int sy) { super(); this.parallaxsNumber = parallaxsNumber; surface = Drawable.loadSpriteParallaxed(media, this.parallaxsNumber, sx, sy); surface.load(false); mainY = decY + 64; this.decX = surface.getWidth() + decX; offsetX = surface.getWidth(); factH = sx / 100.0 / 0.6; x = new double[this.parallaxsNumber]; x2 = new double[this.parallaxsNumber]; y = new double[this.parallaxsNumber]; for (int i = 0; i < this.parallaxsNumber; i++) { x[i] = 0.0; x2[i] = 0.0; y[i] = 0.0; } setScreenSize(source.getWidth(), source.getHeight()); } Parallax(SourceResolutionProvider source,
                    Media media,
                    int parallaxsNumber,
                    int decX,
                    int decY,
                    int sx,
                    int sy); final void setScreenSize(int screenWidth, int screenHeight); @Override void update(double extrp, int x, int y, double speed); @Override void render(Graphic g);  }### Answer:
@Test void testParallax() { final Parallax parallax = new Parallax(new SourceResolutionProvider() { @Override public int getWidth() { return 320; } @Override public int getHeight() { return 240; } @Override public int getRate() { return 60; } }, Medias.create("surface.png"), 11, 1, 2, 100, 100); parallax.setScreenSize(320, 240); parallax.update(1.0, 1, 0, 200.0); parallax.update(1.0, 1, 200, 200.0); parallax.update(1.0, 1, 300, 200.0); parallax.update(1.0, 1, 0, -200.0); parallax.update(1.0, 1, 0, -200.0); parallax.update(1.0, 1, 0, -200.0); final Graphic g = Graphics.createGraphic(); parallax.render(g); g.dispose(); }