### Question:
HeaderDefinition { public void validate() { check("firstLine", this.firstLine); check("beforeEachLine", this.beforeEachLine); check("endLine", this.endLine); check("afterEachLine", this.afterEachLine); check("firstLineDetectionPattern", this.firstLineDetectionPattern); check("lastLineDetectionPattern", this.lastLineDetectionPattern); check("isMultiline", this.isMultiline); check("allowBlankLines", this.allowBlankLines); } HeaderDefinition(String type,
                            String firstLine, String beforeEachLine,
                            String endLine, String afterEachLine,
                            String skipLinePattern,
                            String firstLineDetectionPattern, String lastLineDetectionPattern,
                            boolean allowBlankLines, boolean isMultiline, boolean padLines);  HeaderDefinition(String type); String getFirstLine(); String getBeforeEachLine(); String getEndLine(); String getAfterEachLine(); String getType(); boolean allowBlankLines(); boolean isPadLines(); boolean isSkipLine(String line); boolean isFirstHeaderLine(String line); boolean isLastHeaderLine(String line); void setPropertyFromString(String property, String value); void validate(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); boolean isMultiLine();  }### Answer:
@Test public void test_ok1() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", "before", "end", "", "skip", "firstDetect", "lastDetect", false, false, false); def.validate(); }
@Test public void test_ok2() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", "before", "end", "after", null, "firstDetect", "lastDetect", false, false, false); def.validate(); }
@Test(expected = IllegalStateException.class) public void test_missing_firstLine() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", null, "before", "end", "after", null, "firstDetect", "lastDetect", false, false, false); def.validate(); }
@Test(expected = IllegalStateException.class) public void test_missing_before() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", null, "end", "after", null, "firstDetect", "lastDetect", false, false, false); def.validate(); }
@Test(expected = IllegalStateException.class) public void test_missing_end() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", "before", null, "after", null, "firstDetect", "lastDetect", false, false, false); def.validate(); }
@Test(expected = IllegalStateException.class) public void test_missing_after() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", "before", "end", null, null, "firstDetect", "lastDetect", false, false, false); def.validate(); }
@Test(expected = IllegalStateException.class) public void test_missing_firstDetect() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", "before", "end", "", null, "", "lastDetect", false, false, false); def.validate(); }
@Test(expected = IllegalStateException.class) public void test_missing_lastDetect() throws Exception { HeaderDefinition def = new HeaderDefinition("aa", "firstLine", "before", "end", "", null, "firstDetect", "", false, false, false); def.validate(); }