METHOD_0 ( ) { final uk . gov . IDENT_0 . services . IDENT_1 . IDENT_2 IDENT_3 = mock ( uk . gov . IDENT_0 . services . IDENT_1 . IDENT_2 . class ) ; when ( IDENT_3 . metadata ( ) ) . thenReturn ( null ) ; try { IDENT_4 . METHOD_1 ( IDENT_3 ) ; org . junit . Assert . fail ( ) ; } catch ( final uk . gov . IDENT_0 . services . core . IDENT_5 . IDENT_6 expected ) { "<AssertPlaceHolder>" ; } } METHOD_1 ( uk . gov . IDENT_0 . services . IDENT_1 . IDENT_2 ) { final uk . gov . IDENT_0 . services . IDENT_1 . IDENT_7 metadata = IDENT_3 . metadata ( ) ; if ( metadata != null ) { return metadata ; } throw new uk . gov . IDENT_0 . services . core . IDENT_5 . METHOD_2 ( STRING_0 ) ; }
org . junit . Assert . assertThat ( expected . getMessage ( ) , org . hamcrest . CoreMatchers . is ( STRING_0 ) )