title: RestAssured, POJO and dealing with lists
body: <p>I'm writing a test for an API and at one endpoint I get  JOSN in response with couple arrays into one array.
  Can I make POJO class which mapping those array/arrays into a class object?</p>
  
  <p>for example, JSON in response looks like this:</p>
  
  <pre><code>{
  "total": 55,
  "limit": 500,
  "skip": 0,
  "data": [
      {
          "id": 13,
          "email": "probe@gmail.com",
          "phone": "121-121-123",
          "firstName": "Prob",
          "lastName": "Buraz",
          "platforms": [
              {
                  "id": 3,
                  "name": "Dowe Assis",
                  "url": "ins.probe.com",
                  "user_platforms": {
                      "id": 496,
                      "userId": 13,
                      "platformId": 100,
                      "user_id": 82
                  }
              }
          ], .....
  </code></pre>
  
  <p>And so on. I suppose that I can use this class for mapping response into POJO:</p>
  
  <pre><code> @JsonIgnoreProperties(ignoreUnknown = true) 
  public class GetUsers {
  
  public  Integer total;
  
  public Integer limit;
  
  public List&lt;DataReference&gt; data;   
  @JsonIgnoreProperties(ignoreUnknown = true)
  public static class DataReference{              
      public int id;
      public String email;
      public String phone;
      public String firstName;
      public String lastName;
  
  
  public List&lt;Platform&gt; platforms;                    
  @JsonIgnoreProperties(ignoreUnknown = true)             
  public static class Platform{
      public Integer id;
      public String name;
      public String url;
  }   
  </code></pre>
  
  <p>}</p>
  
  <pre><code>}
  </code></pre>
  
  <p>But in the test code i can get nothing more then data elements. platforms elements are untouchable:</p>
  
  <pre><code> GetUsers users = given()
            .header("Authorization",              
                    "Bearer " + adminToken)        //
            .when()
            .get()
            .then()//.log().all()
            .statusCode(200)//.log().all()
            .extract().as(GetUsers.class);
  </code></pre>
  
  <p>i can checks values of array data like those:</p>
  
  <pre><code> assertThat(users.data).extracting(user -&gt; user.email).contains("probe1@gmail.com", probe+2@gmail.com, ... );
  </code></pre>
  
  <p>But i can't access to any value of <strong>users.data.platforms.name</strong> or <strong>users.data.platforms.id</strong> and so on.</p>
  
  <p>How I can access to platform element for one of users?</p>
  
  <pre><code>users.data.platforms.name
  </code></pre>
  
  <p>How i can do that (access platforms data) for one or for all listed users in data array?</p>