title: how to write Junit test case for testing duplicate elements in List
body: <p>How to write junit test case to test the duplicate value in the userList below mentioned in the code </p>
  
  <pre><code>public List&lt;User&gt; getUsersNotInCurrentGroup()
  {
  List&lt;User&gt; userList = null;
  userList = getEntityManager().createQuery("select * from User")
  
  return userList;
  }
  </code></pre>