title: Junit Testing with data file
body: <p>Sorry I the question is duplicated, if its the case, please link the thread.</p>
  
  <p>I want to test Java with Junit. Now I have a data file and read out these datas. How could I validate them? I tried it with class and objects but if I have a lot of test cases, there would be a lot of classes which is uncomfortable to test. My goal is to trigger different actions in java depending on the data's I have read in.</p>
  
  <p>To get my point, here is my example data file:</p>
  
  <pre><code>{
      "fruit": "Apple",
      "size": "Large",
      "color": "Red"
  }
  </code></pre>
  
  <p>We assume that we have read out these key/value pairs. </p>
  
  <p>If I want to continue working with these values, <strong>HOW</strong> can I validate them? Like how is it possible to check if the key fruit and the value apple is spelled correctly? 
  It could be that I have an alphabet wrench in the inside or something like that.</p>
  
  <p>I hope you can give me other options than making an object an working with them.</p>