title: how to do Junit test for a Libgdx class has pictures and pictures button
body: <p>the Menu Class</p>
  <pre><code>package com.gdx.game.screens;
  
  import com.badlogic.gdx.Gdx;
  import com.badlogic.gdx.Screen;
  import com.badlogic.gdx.graphics.GL20;
  import com.badlogic.gdx.graphics.Texture;
  import com.gdx.game.HuntersGame;
  
  public class InfoScreen implements Screen {
      
      HuntersGame game;
      Texture background,backBefore,backAfter,textInfo;
      /**
       * Constructor, Links the Game instance
       * @param game the Game instance provided by the GameScreen, contains the sprite batch
       *             which is essential for rendering
       */
      public InfoScreen(HuntersGame game){
          this.game = game;
          //play button as image
          backBefore = new Texture(&quot;backBefore.png&quot;);
          backAfter = new Texture(&quot;backAfter.png&quot;);
          //text
          textInfo = new Texture(&quot;info.png&quot;);
          //background
          background = new Texture(&quot;grass-info.jpg&quot;);
      }
  
      @Override
      public void show() {
          
      }
  
      @Override
      public void render(float delta) {
          Gdx.gl.glClearColor(1, 0, 0, 1);
          Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  
          //positions of back button
          int xb= backBefore.getWidth();
          int yb= backBefore.getHeight();
          //positions of the mouse
          int x=Gdx.input.getX(),y=Gdx.input.getY();
  
          //start batch
          game.batch.begin();
          game.batch.draw(background,0,0,Gdx.graphics.getWidth(),Gdx.graphics.getHeight());
          game.batch.draw(textInfo,0,-30,Gdx.graphics.getWidth(),Gdx.graphics.getHeight());
          //start script for touch and click by mouse
  
          if(x&gt;=0 &amp;&amp; x&lt;=backBefore.getWidth() &amp;&amp; y&gt;=0 &amp;&amp; y&lt;=backBefore.getHeight()){
              game.batch.draw(backAfter,0,Gdx.graphics.getHeight()-backBefore.getHeight());
              if(Gdx.input.isTouched()){
                  this.dispose();
                  game.setScreen(new MenuScreen(game));
              }
          }else{
              game.batch.draw(backBefore,0,Gdx.graphics.getHeight()-backBefore.getHeight());
          }
  
          game.batch.end();
      }
  
      @Override
      public void resize(int width, int height) {
  
      }
  
      @Override
      public void pause() {
  
      }
  
      @Override
      public void resume() {
  
      }
  
      @Override
      public void hide() {
  
      }
  
      @Override
      public void dispose() {
  
      }
  }
  
  </code></pre>
  <p>I wanted to do a test for this class I don't know how and I tried to import Mockito as every other code did but not work with me I tried for like 6 hours with no result cause I don't know how that Mockito works and search too much with no benefits and I want just an example for that class then I will try to do advanced examples
  thank you in advance
  PS: for the images i used you can use any image to check the code and for HunterGame class is down</p>
  <pre><code>package com.gdx.game;
  
  
  import com.badlogic.gdx.Game;
  import com.badlogic.gdx.graphics.Texture;
  import com.badlogic.gdx.graphics.g2d.SpriteBatch;
  import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
  import com.gdx.game.screens.GameScreen;
  import com.gdx.game.screens.MenuScreen;
  
  
  public class HuntersGame extends Game {
      public SpriteBatch batch;
  
      @Override
      public void create () {
          batch = new SpriteBatch();
          this.setScreen(new MenuScreen((this)));
      }
      
      @Override
      public void dispose () {
          batch.dispose();
      }
  }
  [the info class looks like][1]
  </code></pre>