code: public String getValue(String keyMsgType) throws IOException {
          if(keyToValue.containsKey(keyMsgType)) {
              return keyToValue.get(keyMsgType);
          }
          else {
              throw new IOException("Key " + keyMsgType + " doesn't exist in " + keyToValue);
          }
      }
docs: Gets the value associated with the key from the message. This version throws an exception
  if the key is not available and should be used for mandatory fields
  @param keyMsgType the key to obtain
  @return the associated value