title: JUnit test case for Action Class (Struts 2) when each method returns a model
body: <p>I'm new to JUnit and I need to write JUnit test cases for many methods like this. Any leads are much appreciated.Thanks</p>
  
  <pre class="lang-java prettyprint-override"><code>public String screen() {
  
      ServiceRequest request = new ServiceRequest(
              Key1.Key2.Home.screenDisplay,
              Key1.Key2.serviceClass);
      ServiceResponse response = getService(request);
      someModel = new someModel();
      someModel = (someModel) response
              .getOutput(Key1.Key2.Home.Out);
      if (someModel != null) {
  
          someModel.setList(someModel.getList());
  
          setsomeModel(someModel);
      }
      return SUCCESS;
  
  }
  </code></pre>