@Test public void list_of_one_element_returns_element() { Object element = new Object(); this.list.add(element); Object result = this.strategy.get(this.list); assertSame(element, result); }
@Override public <T> T get(List<T> list) { int index = random.nextInt(list.size()); return list.get(index); }
RandomElementStrategy implements ElementFromListStrategy { @Override public <T> T get(List<T> list) { int index = random.nextInt(list.size()); return list.get(index); } }
RandomElementStrategy implements ElementFromListStrategy { @Override public <T> T get(List<T> list) { int index = random.nextInt(list.size()); return list.get(index); }  }
RandomElementStrategy implements ElementFromListStrategy { @Override public <T> T get(List<T> list) { int index = random.nextInt(list.size()); return list.get(index); }  @Override T get(List<T> list); }
RandomElementStrategy implements ElementFromListStrategy { @Override public <T> T get(List<T> list) { int index = random.nextInt(list.size()); return list.get(index); }  @Override T get(List<T> list);  }