@Factory
  public static Matcher<String> notEmptyString() {
    return new CustomTypeSafeMatcher<String>("not empty") {
      @Override
      protected boolean matchesSafely(String s) {
        return !s.isEmpty();
      }
    };
  }
@Factory
  public static Matcher<String> notEmptyString() {
    return new CustomTypeSafeMatcher<String>("not empty") {
      @Override
      protected boolean matchesSafely(String s) {
        return !s.isEmpty();
      }
    };
  }
@ 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

Example:
<pre>assertThat("this is not an empty string", notEmptyString())</pre>

@return
matcher for a not empty string
A matcher matching non - null and non - empty strings