private void validate ( final CacheResponse response , final String keyword ) { if ( ! response . getMessage ( ) . toLowerCase ( Locale . US ) . startsWith ( keyword ) ) { throw new IllegalArgumentException ( response . getMessage ( ) ) ; } }
Validates that the keyword expected was returned . Otherwise throws an exception with the message returned included .