METHOD_0 ( ) { org . sagebionetworks . repo . web . controller . IDENT_0 converter = new org . sagebionetworks . repo . web . controller . METHOD_1 ( ) ; converter . write ( project , IDENT_1 . IDENT_2 , IDENT_3 ) ; java . io . ByteArrayInputStream in = new java . io . ByteArrayInputStream ( IDENT_4 . toByteArray ( ) ) ; org . mockito . Mockito . when ( IDENT_5 . METHOD_2 ( ) ) . thenReturn ( in ) ; org . sagebionetworks . schema . adapter . IDENT_6 results = converter . read ( org . sagebionetworks . repo . model . IDENT_7 . class , IDENT_5 ) ; "<AssertPlaceHolder>" ; } read ( java . lang . Class , org . springframework . http . IDENT_8 ) { java . nio . IDENT_9 . IDENT_10 IDENT_11 = IDENT_12 . METHOD_3 ( ) . METHOD_4 ( ) . METHOD_5 ( ) ; if ( IDENT_11 == null ) { IDENT_11 = org . sagebionetworks . repo . web . controller . METHOD_1 . IDENT_13 ; } java . lang . String IDENT_14 = org . sagebionetworks . repo . web . controller . METHOD_1 . METHOD_6 ( IDENT_12 . METHOD_2 ( ) , IDENT_11 ) ; try { return org . sagebionetworks . schema . adapter . org . json . IDENT_15 . METHOD_7 ( IDENT_14 , clazz ) ; } catch ( org . sagebionetworks . schema . adapter . IDENT_16 e ) { try { org . json . JSONObject IDENT_17 = new org . json . JSONObject ( IDENT_14 ) ; if ( IDENT_17 . METHOD_8 ( org . sagebionetworks . repo . web . controller . METHOD_1 . IDENT_18 ) ) { java . lang . String type = IDENT_17 . getString ( org . sagebionetworks . repo . web . controller . METHOD_1 . IDENT_18 ) ; IDENT_17 . remove ( org . sagebionetworks . repo . web . controller . METHOD_1 . IDENT_18 ) ; IDENT_17 . put ( org . sagebionetworks . repo . web . controller . METHOD_1 . IDENT_19 , type ) ; IDENT_14 = IDENT_17 . toString ( ) ; return org . sagebionetworks . schema . adapter . org . json . IDENT_15 . METHOD_7 ( IDENT_14 , clazz ) ; } else { throw new org . springframework . http . converter . METHOD_9 ( e . getMessage ( ) , e ) ; } } catch ( org . json . IDENT_20 IDENT_21 ) { throw new org . springframework . http . converter . METHOD_9 ( IDENT_21 . getMessage ( ) , e ) ; } catch ( org . sagebionetworks . schema . adapter . IDENT_16 IDENT_22 ) { throw new org . springframework . http . converter . METHOD_9 ( IDENT_22 . getMessage ( ) , e ) ; } } }
org . junit . Assert . assertEquals ( project , results )