METHOD_0 ( ) { final java . io . ByteArrayOutputStream IDENT_0 = new java . io . ByteArrayOutputStream ( ) ; final javax . xml . stream . IDENT_1 writer = javax . xml . stream . IDENT_2 . newInstance ( ) . METHOD_1 ( IDENT_0 ) ; writer . METHOD_2 ( STRING_0 ) ; org . IDENT_3 . commons . xml . IDENT_4 . METHOD_3 ( writer , STRING_1 , STRING_2 ) ; final org . IDENT_3 . IDENT_5 . metadata . IDENT_6 IDENT_7 = METHOD_4 ( ) ; java . lang . String IDENT_8 = STRING_3 ; org . IDENT_3 . services . metadata . IDENT_9 provider = org . mockito . Mockito . mock ( org . IDENT_3 . services . metadata . IDENT_9 . class ) ; java . util . List < org . IDENT_3 . commons . IDENT_10 . metadata . IDENT_11 > IDENT_12 = new java . util . ArrayList < org . IDENT_3 . commons . IDENT_10 . metadata . IDENT_11 > ( ) ; IDENT_12 . add ( METHOD_5 ( STRING_4 , STRING_5 ) ) ; IDENT_12 . add ( METHOD_5 ( STRING_6 ) ) ; when ( provider . METHOD_6 ( org . mockito . Mockito . any ( javax . xml . IDENT_13 . IDENT_14 . class ) ) ) . thenReturn ( IDENT_12 ) ; org . IDENT_3 . services . IDENT_15 . controller . IDENT_16 . IDENT_17 . IDENT_18 IDENT_19 = new org . IDENT_3 . services . IDENT_15 . controller . IDENT_16 . IDENT_17 . METHOD_7 ( provider , null , IDENT_8 ) ; org . IDENT_3 . IDENT_17 . IDENT_20 IDENT_17 = new org . IDENT_3 . IDENT_17 . persistence . IDENT_21 . METHOD_8 ( IDENT_7 , java . util . Collections . < org . IDENT_3 . IDENT_17 . IDENT_20 > emptyList ( ) , java . util . Collections . < org . IDENT_3 . IDENT_5 . IDENT_22 > emptyList ( ) , null ) ; IDENT_19 . METHOD_9 ( writer , IDENT_17 ) ; writer . METHOD_10 ( ) ; writer . METHOD_11 ( ) ; IDENT_0 . close ( ) ; final java . io . InputStream is = org . IDENT_3 . services . IDENT_15 . controller . IDENT_16 . IDENT_17 . IDENT_23 . class . getResourceAsStream ( STRING_7 ) ; final byte [ ] expected = org . IDENT_24 . util . IDENT_25 . METHOD_12 ( is , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } close ( ) { METHOD_11 ( ) ; out . close ( ) ; }
org . junit . Assert . assertArrayEquals ( expected , IDENT_0 . toByteArray ( ) )