METHOD_0 ( ) { int [ ] expected = new int [ ] { 0 , 1 } ; com . IDENT_0 . stream . IDENT_1 stream = com . IDENT_0 . stream . IDENT_1 . of ( new com . IDENT_0 . stream . iterator . IDENT_2 . METHOD_1 ( ) { int index = 0 ; @ com . IDENT_0 . stream . IDENT_3 . Override public boolean hasNext ( ) { return ( index ) < 2 ; } @ com . IDENT_0 . stream . IDENT_3 . Override public int METHOD_2 ( ) { return ( index ) ++ ; } } ) ; "<AssertPlaceHolder>" ; } toArray ( ) { return com . IDENT_0 . stream . internal . IDENT_4 . METHOD_3 ( iterator ) ; }
org . junit . Assert . assertThat ( stream . toArray ( ) , org . hamcrest . CoreMatchers . is ( expected ) )