@Test public void asListWithNullAsIterable() { Throwable actual = thrownBy( () -> Iterables.asList( null ) ); assertThat( actual ) .hasMessage( Iterables.ITERABLE_MUST_NOT_BE_NULL ) .isInstanceOf( IllegalArgumentException.class ); }
public static <T> List<T> asList( Iterable<T> iterable ) { checkArgument( iterable != null, ITERABLE_MUST_NOT_BE_NULL ); List<T> result = new ArrayList<>(); for( T element : iterable ) { result.add( element ); } return result; }
Iterables { public static <T> List<T> asList( Iterable<T> iterable ) { checkArgument( iterable != null, ITERABLE_MUST_NOT_BE_NULL ); List<T> result = new ArrayList<>(); for( T element : iterable ) { result.add( element ); } return result; } }
Iterables { public static <T> List<T> asList( Iterable<T> iterable ) { checkArgument( iterable != null, ITERABLE_MUST_NOT_BE_NULL ); List<T> result = new ArrayList<>(); for( T element : iterable ) { result.add( element ); } return result; } private  Iterables(); }
Iterables { public static <T> List<T> asList( Iterable<T> iterable ) { checkArgument( iterable != null, ITERABLE_MUST_NOT_BE_NULL ); List<T> result = new ArrayList<>(); for( T element : iterable ) { result.add( element ); } return result; } private  Iterables(); static List<T> asList( Iterable<T> iterable ); }
Iterables { public static <T> List<T> asList( Iterable<T> iterable ) { checkArgument( iterable != null, ITERABLE_MUST_NOT_BE_NULL ); List<T> result = new ArrayList<>(); for( T element : iterable ) { result.add( element ); } return result; } private  Iterables(); static List<T> asList( Iterable<T> iterable );  }