@Test
public void testSerializeOperatingSystems() throws Exception {

  final List<RepositoryInfo> repositories = new ArrayList<RepositoryInfo>();
  final RepositoryInfo repository = new RepositoryInfo();
  repository.setBaseUrl("baseurl");
  repository.setOsType("os");
  repository.setRepoId("repoId");
  repository.setUnique(true);
  repository.setAmbariManagedRepositories(true);
  repositories.add(repository);
  final String serialized = helper.serializeOperatingSystems(repositories);
  Assert.assertEquals("[{\"OperatingSystems/ambari_managed_repositories\":true,\"repositories\":[{\"Repositories/base_url\":\"baseurl\",\"Repositories/repo_id\":\"repoId\",\"Repositories/unique\":true}],\"OperatingSystems/os_type\":\"os\"}]", serialized);
}