### Question:
IntParser implements ConfigurationParser { @Override public Integer parseValue(String value, Class targetType) { if(value == null) throw new ConfigurationParserException("Could not parse 'null' to int"); return Integer.parseInt(value); }  @Override Set<Class> getResponsibleClasses(); @Override Integer parseValue(String value, Class targetType);  }### Answer:
@Test public void parseValue() { assertEquals(1, parser.parseValue("1", Integer.class)); assertEquals(-5564, parser.parseValue("-5564", Integer.class)); assertEquals(35005, parser.parseValue("35005", Integer.class)); assertEquals(-8, parser.parseValue("-8", Integer.class)); assertEquals(0, parser.parseValue("0", Integer.class)); }
@Test(expected = ConfigurationParserException.class) public void parseNull() { parser.parseValue(null, Integer.class); fail(); }
@Test(expected = NumberFormatException.class) public void parseInvalidDouble1() { parser.parseValue("asdf", Integer.class); fail(); }
@Test(expected = NumberFormatException.class) public void parseInvalidDouble2() { parser.parseValue("5555.5", Integer.class); fail(); }