@@ -0,0 +1,2261 @@
+package com.ksoichiro.task.form;%0A%0Aimport lombok.AllArgsConstructor;%0Aimport org.junit.Before;%0Aimport org.junit.experimental.theories.DataPoints;%0Aimport org.junit.experimental.theories.Theories;%0Aimport org.junit.experimental.theories.Theory;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.BeanUtils;%0Aimport org.springframework.validation.BindException;%0Aimport org.springframework.validation.ValidationUtils;%0Aimport org.springframework.validation.Validator;%0Aimport org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A@RunWith(Theories.class)%0Apublic class TaskCreateFormTests %7B%0A    @AllArgsConstructor%0A    static class Fixture %7B%0A        private TaskCreateForm form;%0A        private boolean expectedError;%0A        private Map%3CString, String%3E errors;%0A    %7D%0A%0A    @DataPoints%0A    public static final Fixture%5B%5D FIXTURES = new Fixture%5B%5D%7B%0A        new Fixture(new TaskCreateForm(null, null, null), true, new HashMap%3CString, String%3E() %7B%0A            %7B%0A                put(%22name%22, %22may not be empty%22);%0A                put(%22status%22, %22may not be null%22);%0A            %7D%0A        %7D),%0A    %7D;%0A%0A    private Validator validator;%0A%0A    @Before%0A    public void setUp() %7B%0A        validator = createValidator();%0A    %7D%0A%0A    @Theory%0A    public void validate(Fixture fixture) %7B%0A        TaskCreateForm form = new TaskCreateForm();%0A        BeanUtils.copyProperties(fixture, form);%0A        BindException errors = new BindException(form, %22form%22);%0A        ValidationUtils.invokeValidator(validator, form, errors);%0A        assertThat(errors.hasErrors(), is(fixture.expectedError));%0A        assertThat(errors.getFieldErrors().size(), is(fixture.errors.size()));%0A        fixture.errors.keySet().forEach(e -%3E %7B%0A            assertThat(errors.hasFieldErrors(e), is(true));%0A            assertThat(errors.getFieldError(e).getDefaultMessage(), is(fixture.errors.get(e)));%0A        %7D);%0A    %7D%0A%0A    private Validator createValidator() %7B%0A        LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean();%0A        localValidatorFactoryBean.afterPropertiesSet();%0A        return localValidatorFactoryBean;%0A    %7D%0A%7D%0A

Add tests for validation