### Question:
DdlInfoFileImpl implements DdlInfoFile { protected int convertToInt(String value) { int versionNo; try { versionNo = Integer.valueOf(value); } catch (NumberFormatException e) { throw new IllegalDdlInfoVersionRuntimeException(file.getPath(), value); } if (versionNo < 0) { throw new IllegalDdlInfoVersionRuntimeException(file.getPath(), value); } return versionNo; } DdlInfoFileImpl(File file); int getCurrentVersionNo(); int getNextVersionNo(); void applyNextVersionNo(String comment);  }### Answer:
@Test public void testConvertToInt() { DdlInfoFileImpl ddlInfoFile = new DdlInfoFileImpl(new File("file")); assertEquals(10, ddlInfoFile.convertToInt("10")); }
@Test public void testConvertToInt_null() { DdlInfoFileImpl ddlInfoFile = new DdlInfoFileImpl(new File("file")); try { ddlInfoFile.convertToInt(null); fail(); } catch (IllegalDdlInfoVersionRuntimeException expected) { } }
@Test public void testConvertToInt_notNumber() { DdlInfoFileImpl ddlInfoFile = new DdlInfoFileImpl(new File("file")); try { ddlInfoFile.convertToInt("aaa"); fail(); } catch (IllegalDdlInfoVersionRuntimeException expected) { } }
@Test public void testConvertToInt_minus() { DdlInfoFileImpl ddlInfoFile = new DdlInfoFileImpl(new File("file")); try { ddlInfoFile.convertToInt("-10"); fail(); } catch (IllegalDdlInfoVersionRuntimeException expected) { } }
@Test public void testToInt_greaterThanInteger() { DdlInfoFileImpl ddlInfoFile = new DdlInfoFileImpl(new File("file")); long value = (long) Integer.MAX_VALUE + 1; try { ddlInfoFile.convertToInt(String.valueOf(value)); fail(); } catch (IllegalDdlInfoVersionRuntimeException expected) { } }