// Path: src/main/java/io/pivio/view/app/overview/detail/serverresponse/Document.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class Document {
// 
//     public String owner;
//     public String data_format_version;
//     public String description;
//     public String type;
//     public String vcsroot;
//     public String name;
//     public String short_name;
//     public String id;
//     public String contact;
//     public String created;
//     public String lastUpload;
//     public String lastUpdate;
//     public String status;
//     public String product_context;
//     public List<String> tags = new ArrayList<>();
//     public Map<String, String> links = new HashMap<>();
// 
//     public Runtime runtime = new Runtime();
//     public List<SoftwareDependency> software_dependencies = new ArrayList<>();
//     public Service service = new Service();
//     public Context context = new Context();
// 
//     @Override
//     public String toString() {
//         return "Document{" +
//                 "owner='" + owner + '\'' +
//                 ", data_format_version='" + data_format_version + '\'' +
//                 ", description='" + description + '\'' +
//                 ", type='" + type + '\'' +
//                 ", vcsroot='" + vcsroot + '\'' +
//                 ", name='" + name + '\'' +
//                 ", short_name='" + short_name + '\'' +
//                 ", id='" + id + '\'' +
//                 ", contact='" + contact + '\'' +
//                 ", created='" + created + '\'' +
//                 ", lastUpload='" + lastUpload + '\'' +
//                 ", lastUpdate='" + lastUpdate + '\'' +
//                 ", status='" + status + '\'' +
//                 ", product_context='" + product_context + '\'' +
//                 ", tags=" + tags +
//                 ", links=" + links +
//                 ", runtime=" + runtime +
//                 ", software_dependencies=" + software_dependencies +
//                 ", service=" + service +
//                 ", context=" + context +
//                 '}';
//     }
// 
//     public boolean ofTypeService() {
//         return type.equalsIgnoreCase("service");
//     }
// 
// }
// 
// Path: src/main/java/io/pivio/view/app/overview/detail/serverresponse/License.java
// @JsonIgnoreProperties(ignoreUnknown=true)
// public class License {
//     public String fullName;
//     public String url;
// 
//     public License(String fullName, String url) {
//         this.fullName = fullName;
//         this.url = url;
//     }
// 
//     public License() {
//     }
// }
// 
// Path: src/main/java/io/pivio/view/app/overview/detail/serverresponse/SoftwareDependency.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class SoftwareDependency implements Comparable {
// 
//     public String name;
//     public String version;
//     public List<License> licenses = new ArrayList<>();
// 
//     public SoftwareDependency() {
//     }
// 
//     public SoftwareDependency(String name, String version, List<License> licenses) {
//         this.name = name;
//         this.version = version;
//         this.licenses = licenses;
//     }
// 
//     @Override
//     public int compareTo(Object o) {
//         return name.compareTo(((SoftwareDependency)o).name);
//     }
// }


import io.pivio.view.app.overview.detail.serverresponse.Document;
import io.pivio.view.app.overview.detail.serverresponse.License;
import io.pivio.view.app.overview.detail.serverresponse.SoftwareDependency;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
        List<String> consolidatedLicenses = documentViewModel.getConsolidatedLicenses();
        assertThat(consolidatedLicenses).contains(documentViewModel.UNKNOWN_LICENSE);
    }

    @Test
    public void testSortedDependencies() throws Exception {
        List<SoftwareDependency> sortedDependencies = documentViewModel.getSortedDependencies();
        assertThat(sortedDependencies.get(0).name).isEqualTo("A");
        assertThat(sortedDependencies.get(1).name).isEqualTo("B");
        assertThat(sortedDependencies.get(2).name).isEqualTo("C");
    }

    @Test
    public void testGetShortName() throws Exception {
        assertThat(documentViewModel.getShortName()).isEqualTo("(SHORT)");
    }

    @Test
    public void testGetNullShortName() throws Exception {
        Document document = new Document();
        document.short_name = null;
        documentViewModel = new DocumentViewModel(document);

        assertThat(documentViewModel.getShortName()).isEqualTo("");
    }

    private ArrayList<SoftwareDependency> generateDependencies() {
        ArrayList<SoftwareDependency> softwareDependencies = new ArrayList<>();
        softwareDependencies.add(new SoftwareDependency("B", "1", generateLicenses("-B-")));
        softwareDependencies.add(new SoftwareDependency("A", "1", generateLicenses("-A-")));
// Path: src/main/java/io/pivio/view/app/overview/detail/serverresponse/Document.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class Document {
// 
//     public String owner;
//     public String data_format_version;
//     public String description;
//     public String type;
//     public String vcsroot;
//     public String name;
//     public String short_name;
//     public String id;
//     public String contact;
//     public String created;
//     public String lastUpload;
//     public String lastUpdate;
//     public String status;
//     public String product_context;
//     public List<String> tags = new ArrayList<>();
//     public Map<String, String> links = new HashMap<>();
// 
//     public Runtime runtime = new Runtime();
//     public List<SoftwareDependency> software_dependencies = new ArrayList<>();
//     public Service service = new Service();
//     public Context context = new Context();
// 
//     @Override
//     public String toString() {
//         return "Document{" +
//                 "owner='" + owner + '\'' +
//                 ", data_format_version='" + data_format_version + '\'' +
//                 ", description='" + description + '\'' +
//                 ", type='" + type + '\'' +
//                 ", vcsroot='" + vcsroot + '\'' +
//                 ", name='" + name + '\'' +
//                 ", short_name='" + short_name + '\'' +
//                 ", id='" + id + '\'' +
//                 ", contact='" + contact + '\'' +
//                 ", created='" + created + '\'' +
//                 ", lastUpload='" + lastUpload + '\'' +
//                 ", lastUpdate='" + lastUpdate + '\'' +
//                 ", status='" + status + '\'' +
//                 ", product_context='" + product_context + '\'' +
//                 ", tags=" + tags +
//                 ", links=" + links +
//                 ", runtime=" + runtime +
//                 ", software_dependencies=" + software_dependencies +
//                 ", service=" + service +
//                 ", context=" + context +
//                 '}';
//     }
// 
//     public boolean ofTypeService() {
//         return type.equalsIgnoreCase("service");
//     }
// 
// }
// 
// Path: src/main/java/io/pivio/view/app/overview/detail/serverresponse/License.java
// @JsonIgnoreProperties(ignoreUnknown=true)
// public class License {
//     public String fullName;
//     public String url;
// 
//     public License(String fullName, String url) {
//         this.fullName = fullName;
//         this.url = url;
//     }
// 
//     public License() {
//     }
// }
// 
// Path: src/main/java/io/pivio/view/app/overview/detail/serverresponse/SoftwareDependency.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class SoftwareDependency implements Comparable {
// 
//     public String name;
//     public String version;
//     public List<License> licenses = new ArrayList<>();
// 
//     public SoftwareDependency() {
//     }
// 
//     public SoftwareDependency(String name, String version, List<License> licenses) {
//         this.name = name;
//         this.version = version;
//         this.licenses = licenses;
//     }
// 
//     @Override
//     public int compareTo(Object o) {
//         return name.compareTo(((SoftwareDependency)o).name);
//     }
// }


// Path: src/test/java/io/pivio/view/app/overview/detail/view/DocumentViewModelTest.java
import io.pivio.view.app.overview.detail.serverresponse.Document;
import io.pivio.view.app.overview.detail.serverresponse.License;
import io.pivio.view.app.overview.detail.serverresponse.SoftwareDependency;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;

        List<String> consolidatedLicenses = documentViewModel.getConsolidatedLicenses();
        assertThat(consolidatedLicenses).contains(documentViewModel.UNKNOWN_LICENSE);
    }

    @Test
    public void testSortedDependencies() throws Exception {
        List<SoftwareDependency> sortedDependencies = documentViewModel.getSortedDependencies();
        assertThat(sortedDependencies.get(0).name).isEqualTo("A");
        assertThat(sortedDependencies.get(1).name).isEqualTo("B");
        assertThat(sortedDependencies.get(2).name).isEqualTo("C");
    }

    @Test
    public void testGetShortName() throws Exception {
        assertThat(documentViewModel.getShortName()).isEqualTo("(SHORT)");
    }

    @Test
    public void testGetNullShortName() throws Exception {
        Document document = new Document();
        document.short_name = null;
        documentViewModel = new DocumentViewModel(document);

        assertThat(documentViewModel.getShortName()).isEqualTo("");
    }

    private ArrayList<SoftwareDependency> generateDependencies() {
        ArrayList<SoftwareDependency> softwareDependencies = new ArrayList<>();
        softwareDependencies.add(new SoftwareDependency("B", "1", generateLicenses("-B-")));
        softwareDependencies.add(new SoftwareDependency("A", "1", generateLicenses("-A-")));
        softwareDependencies.add(new SoftwareDependency("C", "1", generateLicenses("-A-")));