METHOD_0 ( ) { org . oscm . app . IDENT_0 . client . IDENT_1 IDENT_2 = mock ( org . oscm . app . IDENT_0 . client . IDENT_1 . class ) ; org . oscm . app . IDENT_0 . data . IDENT_3 IDENT_4 = mock ( org . oscm . app . IDENT_0 . data . IDENT_3 . class ) ; org . oscm . app . IDENT_5 . data . IDENT_6 IDENT_7 = null ; paramHandler . METHOD_1 ( ) . add ( IDENT_7 ) ; parameters . put ( IDENT_8 . IDENT_9 , new org . oscm . app . IDENT_10 . data . METHOD_2 ( org . oscm . app . IDENT_5 . IDENT_8 . IDENT_9 , IDENT_11 ) ) ; java . util . List < org . oscm . app . IDENT_5 . data . IDENT_12 > IDENT_13 = new java . util . ArrayList ( ) ; IDENT_13 . add ( new org . oscm . app . IDENT_5 . data . METHOD_3 ( ( ( IDENT_11 ) + STRING_0 ) , STRING_1 , IDENT_11 , 2 ) ) ; IDENT_13 . add ( new org . oscm . app . IDENT_5 . data . METHOD_3 ( ( ( IDENT_14 ) + STRING_0 ) , STRING_1 , IDENT_14 , 2 ) ) ; doReturn ( IDENT_2 ) . when ( IDENT_15 ) . METHOD_4 ( paramHandler ) ; doReturn ( IDENT_4 ) . when ( IDENT_2 ) . METHOD_5 ( ) ; doReturn ( IDENT_13 ) . when ( IDENT_4 ) . METHOD_6 ( ) ; java . lang . String IDENT_16 = IDENT_15 . METHOD_7 ( paramHandler ) ; "<AssertPlaceHolder>" ; } METHOD_7 ( org . oscm . app . IDENT_5 . IDENT_8 ) { java . lang . String id = paramHandler . METHOD_8 ( ) ; if ( ( id != null ) && ( ( id . trim ( ) . length ( ) ) == 0 ) ) { id = null ; } try { org . oscm . app . IDENT_0 . client . IDENT_1 IDENT_2 = METHOD_4 ( paramHandler ) ; org . oscm . app . IDENT_5 . data . IDENT_6 config = paramHandler . METHOD_1 ( ) . METHOD_9 ( ) ; if ( config == null ) { config = IDENT_2 . METHOD_5 ( ) ; paramHandler . METHOD_1 ( ) . add ( config ) ; } java . util . List < org . oscm . app . IDENT_5 . data . METHOD_3 > IDENT_13 = config . METHOD_6 ( ) ; if ( id == null ) { if ( ( IDENT_13 != null ) && ( ( IDENT_13 . size ( ) ) == 1 ) ) { return IDENT_13 . iterator ( ) . next ( ) . getId ( ) ; } throw new org . oscm . app . IDENT_10 . exceptions . METHOD_10 ( org . oscm . app . IDENT_5 . IDENT_17 . IDENT_18 . METHOD_11 ( STRING_2 , new java . lang . Object [ ] { id } ) ) ; } java . lang . String IDENT_19 = null ; boolean IDENT_20 = true ; if ( IDENT_13 != null ) { for ( org . oscm . app . IDENT_5 . data . METHOD_3 net : IDENT_13 ) { if ( id . equals ( net . getId ( ) ) ) { return id ; } if ( id . equals ( net . getName ( ) ) ) { if ( IDENT_19 == null ) { IDENT_19 = net . getId ( ) ; } else { IDENT_20 = false ; } } } } if ( IDENT_19 != null ) { if ( IDENT_20 ) { return IDENT_19 ; } else { throw new org . oscm . app . IDENT_10 . exceptions . METHOD_10 ( org . oscm . app . IDENT_5 . IDENT_17 . IDENT_18 . METHOD_11 ( STRING_2 , new java . lang . Object [ ] { id } ) ) ; } } } catch ( java . lang . Exception e ) { org . oscm . app . IDENT_0 . IDENT_21 . logger . error ( STRING_3 , e ) ; org . oscm . app . IDENT_10 . exceptions . METHOD_10 exception = METHOD_12 ( e , STRING_2 ) ; throw exception ; } return null ; }
org . junit . Assert . assertEquals ( IDENT_11 , IDENT_16 )