package com.cron.utils.model;

import org.junit.Test;

public class CronDefinitionTest {

    @Test(expected = NullPointerException.class)
    public void testConstructorNullFieldsParameter() throws Exception {
        new CronDefinition(null, false);
    }

}
@@ -35,226 +35,1333 @@
 ort 
-org.junit.Test;%0A%0Apublic class CronDefinitionTest %7B%0A%0A    @Test(expected = NullPointerException.class)%0A    public void testConstructorNullFieldsParameter() throws Exception %7B%0A        new CronDefinition(null, false);%0A    %7D%0A
+com.google.common.collect.Lists;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0A%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class CronDefinitionTest %7B%0A    private boolean lastFieldOptional;%0A    @Mock%0A    private FieldDefinition mockFieldDefinition;%0A%0A    private CronDefinition cronDefinition;%0A%0A    @Before%0A    public void setUp()%7B%0A        lastFieldOptional = true;%0A        List%3CFieldDefinition%3E fields = Lists.newArrayList();%0A        fields.add(mockFieldDefinition);%0A        cronDefinition = new CronDefinition(fields, lastFieldOptional);%0A    %7D%0A%0A%0A    @Test(expected = NullPointerException.class)%0A    public void testConstructorNullFieldsParameter() throws Exception %7B%0A        new CronDefinition(null, lastFieldOptional);%0A    %7D%0A%0A    @Test%0A    public void testLastFieldOptional() throws Exception %7B%0A        assertEquals(lastFieldOptional, cronDefinition.isLastFieldOptional());%0A    %7D%0A%0A    @Test%0A    public void testGetFieldDefinitions() throws Exception %7B%0A        assertNotNull(cronDefinition.getFieldDefinitions());%0A        assertEquals(1, cronDefinition.getFieldDefinitions().size());%0A        assertTrue(cronDefinition.getFieldDefinitions().contains(mockFieldDefinition));%0A    %7D
 %0A%7D

Add tests for CronDefinition