// Path: drm-core/src/test/java/com/nitorcreations/testdomain/Selfie.java
// public class Selfie {
//     private Selfie me;
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/Task.java
// public class Task {
//     private final List<Employee> assignedEmployees = new ArrayList<>();
//     private final Manager manager;
//     private boolean completed;
//     private final String description;
// 
//     public Task(final String description, final Manager manager, final Employee... employees) {
//         this.description = description;
//         this.manager = manager;
//         assignedEmployees.addAll(Arrays.asList(employees));
//         completed = false;
//     }
// 
//     public Manager getManager() {
//         return manager;
//     }
// 
//     public List<Employee> getAssignedEmployees() {
//         return assignedEmployees;
//     }
// 
//     public void addEmployee(final Employee e) {
//         assignedEmployees.add(e);
//     }
// 
//     public void removeEmployee(final Employee e) {
//         assignedEmployees.remove(e);
//     }
// 
//     public void completeTask() {
//         completed = true;
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/Timesheet.java
// public class Timesheet {
//     private final Employee who;
//     private final Task task;
//     private Integer hours;
//     private List<String> stuff;
// 
//     public Timesheet(final Employee who, final Task task, final Integer hours) {
//         this.who = who;
//         this.task = task;
//         this.hours = hours;
//     }
// 
//     public Employee getWho() {
//         return who;
//     }
// 
//     public Task getTask() {
//         return task;
//     }
// 
//     public Integer getHours() {
//         return hours;
//     }
// 
//     /**
//      * Manager can alter hours before closing task
//      *
//      * @param hours New amount of hours
//      */
//     public void alterHours(final Integer hours) {
//         this.hours = hours;
//     }
// 
//     @Override
//     public String toString() {
//         return "Timesheet [who=" + who + ", task=" + task + ", hours=" + hours + "]";
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/DoubleReferer.java
// public class DoubleReferer {
//     private Manager myBoss;
//     private Manager myTeamManager;
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/Employee.java
// public class Employee extends Person {
//     private final String name;
//     private final String department;
// 
//     public Employee(final String name, final String department) {
//         this.name = name;
//         this.department = department;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getDepartment() {
//         return department;
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/Manager.java
// public class Manager extends Person {
//     private final String name;
// 
//     public Manager(final String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/Person.java
// public class Person {
//     private Company company;
//     private List<PhoneNumber> contactNumbers;
// }
// 
// Path: drm-core/src/main/java/com/nitorcreations/presenters/DefaultGraphvizPresenter.java
// public static final String DEFAULTS = "  edge [ fontsize = 11 ];\n  node [ shape=box style=rounded ];";
// 
// Path: drm-core/src/main/java/com/nitorcreations/presenters/DefaultGraphvizPresenter.java
// public static final String DOMAIN_DECLARATION = "digraph domain {\n";


import com.nitorcreations.testdomain.Selfie;
import com.nitorcreations.testdomain.Task;
import com.nitorcreations.testdomain.Timesheet;
import com.nitorcreations.testdomain.person.DoubleReferer;
import com.nitorcreations.testdomain.person.Employee;
import com.nitorcreations.testdomain.person.Manager;
import com.nitorcreations.testdomain.person.Person;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static com.nitorcreations.presenters.DefaultGraphvizPresenter.DEFAULTS;
import static com.nitorcreations.presenters.DefaultGraphvizPresenter.DOMAIN_DECLARATION;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.hasItems;
import static org.junit.Assert.assertThat;
package com.nitorcreations;




public class DomainMapperTest {
    private DomainMapper domainMapper;

    @Test
    public void testDescribeDomain_singleClass() throws ClassNotFoundException {
        List<Class<?>> list = new ArrayList<>();
        list.add(Employee.class);
        domainMapper = new DomainMapper(list);
        String description = DOMAIN_DECLARATION + DEFAULTS + "\n  subgraph cluster_0 {\n    label = \"com.nitorcreations.testdomain.person\";\n    Employee\n  }\n}";
        assertThat(domainMapper.describeDomain(), is(description));
    }

    @Test
    public void testDescribeDomain_selfie() throws ClassNotFoundException {
        List<Class<?>> list = new ArrayList<>();
        list.add(Selfie.class);
        domainMapper = new DomainMapper(list);
        String description = DOMAIN_DECLARATION + DEFAULTS + "\n  subgraph cluster_0 {\n    label = \"com.nitorcreations.testdomain\";\n    Selfie\n  }\n  Selfie -> Selfie [ taillabel = \"me\" dir=forward arrowhead=open];\n}";
        assertThat(domainMapper.describeDomain(), is(description));
    }

    @Test
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/Selfie.java
// public class Selfie {
//     private Selfie me;
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/Task.java
// public class Task {
//     private final List<Employee> assignedEmployees = new ArrayList<>();
//     private final Manager manager;
//     private boolean completed;
//     private final String description;
// 
//     public Task(final String description, final Manager manager, final Employee... employees) {
//         this.description = description;
//         this.manager = manager;
//         assignedEmployees.addAll(Arrays.asList(employees));
//         completed = false;
//     }
// 
//     public Manager getManager() {
//         return manager;
//     }
// 
//     public List<Employee> getAssignedEmployees() {
//         return assignedEmployees;
//     }
// 
//     public void addEmployee(final Employee e) {
//         assignedEmployees.add(e);
//     }
// 
//     public void removeEmployee(final Employee e) {
//         assignedEmployees.remove(e);
//     }
// 
//     public void completeTask() {
//         completed = true;
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/Timesheet.java
// public class Timesheet {
//     private final Employee who;
//     private final Task task;
//     private Integer hours;
//     private List<String> stuff;
// 
//     public Timesheet(final Employee who, final Task task, final Integer hours) {
//         this.who = who;
//         this.task = task;
//         this.hours = hours;
//     }
// 
//     public Employee getWho() {
//         return who;
//     }
// 
//     public Task getTask() {
//         return task;
//     }
// 
//     public Integer getHours() {
//         return hours;
//     }
// 
//     /**
//      * Manager can alter hours before closing task
//      *
//      * @param hours New amount of hours
//      */
//     public void alterHours(final Integer hours) {
//         this.hours = hours;
//     }
// 
//     @Override
//     public String toString() {
//         return "Timesheet [who=" + who + ", task=" + task + ", hours=" + hours + "]";
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/DoubleReferer.java
// public class DoubleReferer {
//     private Manager myBoss;
//     private Manager myTeamManager;
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/Employee.java
// public class Employee extends Person {
//     private final String name;
//     private final String department;
// 
//     public Employee(final String name, final String department) {
//         this.name = name;
//         this.department = department;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getDepartment() {
//         return department;
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/Manager.java
// public class Manager extends Person {
//     private final String name;
// 
//     public Manager(final String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// }
// 
// Path: drm-core/src/test/java/com/nitorcreations/testdomain/person/Person.java
// public class Person {
//     private Company company;
//     private List<PhoneNumber> contactNumbers;
// }
// 
// Path: drm-core/src/main/java/com/nitorcreations/presenters/DefaultGraphvizPresenter.java
// public static final String DEFAULTS = "  edge [ fontsize = 11 ];\n  node [ shape=box style=rounded ];";
// 
// Path: drm-core/src/main/java/com/nitorcreations/presenters/DefaultGraphvizPresenter.java
// public static final String DOMAIN_DECLARATION = "digraph domain {\n";


// Path: drm-core/src/test/java/com/nitorcreations/DomainMapperTest.java
import com.nitorcreations.testdomain.Selfie;
import com.nitorcreations.testdomain.Task;
import com.nitorcreations.testdomain.Timesheet;
import com.nitorcreations.testdomain.person.DoubleReferer;
import com.nitorcreations.testdomain.person.Employee;
import com.nitorcreations.testdomain.person.Manager;
import com.nitorcreations.testdomain.person.Person;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static com.nitorcreations.presenters.DefaultGraphvizPresenter.DEFAULTS;
import static com.nitorcreations.presenters.DefaultGraphvizPresenter.DOMAIN_DECLARATION;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.hasItems;
import static org.junit.Assert.assertThat;

package com.nitorcreations;




public class DomainMapperTest {
    private DomainMapper domainMapper;

    @Test
    public void testDescribeDomain_singleClass() throws ClassNotFoundException {
        List<Class<?>> list = new ArrayList<>();
        list.add(Employee.class);
        domainMapper = new DomainMapper(list);
        String description = DOMAIN_DECLARATION + DEFAULTS + "\n  subgraph cluster_0 {\n    label = \"com.nitorcreations.testdomain.person\";\n    Employee\n  }\n}";
        assertThat(domainMapper.describeDomain(), is(description));
    }

    @Test
    public void testDescribeDomain_selfie() throws ClassNotFoundException {
        List<Class<?>> list = new ArrayList<>();
        list.add(Selfie.class);
        domainMapper = new DomainMapper(list);
        String description = DOMAIN_DECLARATION + DEFAULTS + "\n  subgraph cluster_0 {\n    label = \"com.nitorcreations.testdomain\";\n    Selfie\n  }\n  Selfie -> Selfie [ taillabel = \"me\" dir=forward arrowhead=open];\n}";
        assertThat(domainMapper.describeDomain(), is(description));
    }

    @Test
    public void testDescribeDomain_doubleReferer() throws ClassNotFoundException {