private static String read(String resourceName) {
    try {
      return Resources.toString(Resources.getResource(resourceName), StandardCharsets.UTF_8);
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    }
  }
Tests for {@link AddServiceRequest} serialization / deserialization / syntax validation
ambari-server/src/test/java/org/apache/ambari/server/topology/addservice/AddServiceRequestTest.java