@ Factory public static Matcher < String > notEmptyString ( ) { return new CustomTypeSafeMatcher < String > ( "not empty" ) { @ Override protected boolean matchesSafely ( String s ) { return ! s . isEmpty ( ) ; } } ; }
A matcher matching non - null and non - empty strings