code: public static void expectOk(String response) throws ProtocolException
      {
          if (!"OK".equalsIgnoreCase(response))
          {
              throw new ProtocolException(response, Direction.RECEIVE);
          }
      }
docs: Check the response for an "OK" message. Throw an exception if response is not
  expected.
  
  @param response
  the response to check
  @throws ProtocolException
  if the response is not the expected case-insensitive "OK"