// Path: cm-schema/src/main/java/com/cloudera/parcel/descriptors/ParcelDescriptor.java
// public interface ParcelDescriptor {
// 
//   @NotNull
//   @Range(min = 1, max = 1)
//   Integer getSchema_version();
// 
//   @NotBlank
//   @Pattern(regexp="^((?!-).)*$", message="{custom.validation.constraints.ParcelName.message}")
//   String getName();
// 
//   @NotBlank
//   String getVersion();
// 
//   Map<String, String> getExtraVersionInfo();
// 
//   @NotNull
//   Boolean getSetActiveSymlink();
// 
//   String getDepends();
// 
//   String getReplaces();
// 
//   String getConflicts();
// 
//   Set<String> getProvides();
// 
//   @Valid
//   @NotNull
//   ScriptsDescriptor getScripts();
// 
//   @UniqueField("name")
//   @Valid
//   @NotNull
//   Set<PackageDescriptor> getPackages();
// 
//   @UniqueField("name")
//   @Valid
//   @NotNull
//   Set<ComponentDescriptor> getComponents();
// 
//   @Valid
//   @NotNull
//   Map<String, UserDescriptor> getUsers();
// 
//   @NotNull
//   Set<String> getGroups();
// 
//   ServicesRestartDescriptor getServicesRestartInfo();
// }
// 
// Path: cm-schema/src/main/java/com/cloudera/parcel/descriptors/VersionServicesRestartDescriptor.java
// public interface VersionServicesRestartDescriptor {
// 
//   enum Scope {
//     SERVICE_ONLY,
//     DEPENDENTS_ONLY,
//     SERVICE_AND_DEPENDENTS
//   }
// 
//   /**
//    * Contains a map of service type to {@link Scope}
//    * @return a map of service type to {@link Scope}
//    */
//   @NotNull
//   Map<String, Scope> getServiceInfo();
// 
//   /**
//    * Parent parcel version of this version descriptor.
//    *
//    * Can be null, in which case this is determined to be the oldest version
//    * supported from which the restart information will be used for selective restarts.
//    *
//    * @return parent version, if specified.
//    */
//   String getParentVersion();
// 
//   /**
//    * Child parcel version of this version descriptor.
//    *
//    * Can be null, in which case this is determined to be the newest version
//    * supported from which the restart information will be used for selective restarts.
//    *
//    * @return child version, if specified.
//    */
//   String getChildVersion();
// }
// 
// Path: cm-schema/src/main/java/com/cloudera/parcel/descriptors/VersionServicesRestartDescriptor.java
// enum Scope {
//   SERVICE_ONLY,
//   DEPENDENTS_ONLY,
//   SERVICE_AND_DEPENDENTS
// }


import java.util.Set;
import org.junit.Test;
import static org.junit.Assert.*;
import com.cloudera.parcel.descriptors.ComponentDescriptor;
import com.cloudera.parcel.descriptors.PackageDescriptor;
import com.cloudera.parcel.descriptors.ParcelDescriptor;
import com.cloudera.parcel.descriptors.UserDescriptor;
import com.cloudera.parcel.descriptors.VersionServicesRestartDescriptor;
import com.cloudera.parcel.descriptors.VersionServicesRestartDescriptor.Scope;
import com.cloudera.parcel.validation.ParcelTestUtils;
import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.util.Map;
// Licensed to Cloudera, Inc. under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  Cloudera, Inc. licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.cloudera.parcel.components;





public class JsonParcelParserTest {

  private JsonParcelParser parser = new JsonParcelParser();

  @Test
  public void testParseGoodFile() throws IOException {
// Path: cm-schema/src/main/java/com/cloudera/parcel/descriptors/ParcelDescriptor.java
// public interface ParcelDescriptor {
// 
//   @NotNull
//   @Range(min = 1, max = 1)
//   Integer getSchema_version();
// 
//   @NotBlank
//   @Pattern(regexp="^((?!-).)*$", message="{custom.validation.constraints.ParcelName.message}")
//   String getName();
// 
//   @NotBlank
//   String getVersion();
// 
//   Map<String, String> getExtraVersionInfo();
// 
//   @NotNull
//   Boolean getSetActiveSymlink();
// 
//   String getDepends();
// 
//   String getReplaces();
// 
//   String getConflicts();
// 
//   Set<String> getProvides();
// 
//   @Valid
//   @NotNull
//   ScriptsDescriptor getScripts();
// 
//   @UniqueField("name")
//   @Valid
//   @NotNull
//   Set<PackageDescriptor> getPackages();
// 
//   @UniqueField("name")
//   @Valid
//   @NotNull
//   Set<ComponentDescriptor> getComponents();
// 
//   @Valid
//   @NotNull
//   Map<String, UserDescriptor> getUsers();
// 
//   @NotNull
//   Set<String> getGroups();
// 
//   ServicesRestartDescriptor getServicesRestartInfo();
// }
// 
// Path: cm-schema/src/main/java/com/cloudera/parcel/descriptors/VersionServicesRestartDescriptor.java
// public interface VersionServicesRestartDescriptor {
// 
//   enum Scope {
//     SERVICE_ONLY,
//     DEPENDENTS_ONLY,
//     SERVICE_AND_DEPENDENTS
//   }
// 
//   /**
//    * Contains a map of service type to {@link Scope}
//    * @return a map of service type to {@link Scope}
//    */
//   @NotNull
//   Map<String, Scope> getServiceInfo();
// 
//   /**
//    * Parent parcel version of this version descriptor.
//    *
//    * Can be null, in which case this is determined to be the oldest version
//    * supported from which the restart information will be used for selective restarts.
//    *
//    * @return parent version, if specified.
//    */
//   String getParentVersion();
// 
//   /**
//    * Child parcel version of this version descriptor.
//    *
//    * Can be null, in which case this is determined to be the newest version
//    * supported from which the restart information will be used for selective restarts.
//    *
//    * @return child version, if specified.
//    */
//   String getChildVersion();
// }
// 
// Path: cm-schema/src/main/java/com/cloudera/parcel/descriptors/VersionServicesRestartDescriptor.java
// enum Scope {
//   SERVICE_ONLY,
//   DEPENDENTS_ONLY,
//   SERVICE_AND_DEPENDENTS
// }


// Path: cm-schema/src/test/java/com/cloudera/parcel/components/JsonParcelParserTest.java
import java.util.Set;
import org.junit.Test;
import static org.junit.Assert.*;
import com.cloudera.parcel.descriptors.ComponentDescriptor;
import com.cloudera.parcel.descriptors.PackageDescriptor;
import com.cloudera.parcel.descriptors.ParcelDescriptor;
import com.cloudera.parcel.descriptors.UserDescriptor;
import com.cloudera.parcel.descriptors.VersionServicesRestartDescriptor;
import com.cloudera.parcel.descriptors.VersionServicesRestartDescriptor.Scope;
import com.cloudera.parcel.validation.ParcelTestUtils;
import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.util.Map;

// Licensed to Cloudera, Inc. under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  Cloudera, Inc. licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.cloudera.parcel.components;





public class JsonParcelParserTest {

  private JsonParcelParser parser = new JsonParcelParser();

  @Test
  public void testParseGoodFile() throws IOException {
    ParcelDescriptor parcel = parser.parse(ParcelTestUtils.getParcelJson("good_parcel.json"));