title: Junit - assert the list contains
body: <p>I'm creating a List (ArrayList) that contains few elements. 
  I want to make sure it contains the elements I added.
  now, this works only some of the times, since the order changes:</p>
  
  <pre><code>@Test
  public void testThreeReporters(){
      ClientConfig myConfig = new ClientConfigFactory().getConfig().withMetricsReporters(new HashSet&lt;&gt;(Arrays.asList(ClientConfig.MetricsReporterType.LOG, ClientConfig.MetricsReporterType.GRAPHITE, ClientConfig.MetricsReporterType.CLOUD_WATCH)));
      List&lt;ScheduledReporter&gt; reporters = MetricsFactory.configureMetricsReporters(MetricsFactory.createMetricsClient(),myConfig);
      assertEquals(3, reporters.size());
  
      assertTrue(reporters.get(2) instanceof Slf4jReporter);
      assertTrue(reporters.get(1) instanceof GraphiteReporter);
      assertTrue(reporters.get(0) instanceof CloudWatchReporter);
  }
  </code></pre>
  
  <p>I want to use 'contains' in order to not be depend on the order.
  I tried something like:</p>
  
  <pre><code> assertTrue(Arrays.asList(reporters).contains((Arrays.asList(ClientConfig.MetricsReporterType.LOG, ClientConfig.MetricsReporterType.GRAPHITE, ClientConfig.MetricsReporterType.CLOUD_WATCH))));
  </code></pre>
  
  <p>and some other combinations, but it doesn't work.</p>