### Question:
RawEdge { public void fromText(final Text line) throws IOException { StringTokenizer tokenizer = new StringTokenizer(line.toString(), this.delimiter); if (tokenizer.countTokens() < 2) { throw new IOException("Line of text contained only " + tokenizer.countTokens() + " tokens. This input format requires at least a sourceId and a targetId, with an optional edgeValue." + "raw data: " + line.toString()); } this.sourceId = tokenizer.nextToken(); this.targetId = tokenizer.nextToken(); this.edgeValue = tokenizer.hasMoreTokens() && !this.ignoreThird ? tokenizer.nextToken() : defaultEdgeValue; } RawEdge(final String delimiter, final String defaultEdgeValue, final boolean ignoreThird);  RawEdge(final String delimiter, final String defaultEdgeValue); void fromText(final Text line); String getSourceId(); String getTargetId(); String getEdgeValue();  }### Answer:
@Test(expected=IOException.class) public void testTooFewFields() throws IOException { rawEdge = new RawEdge(",", ""); String badRow = "fancy.email@gmail.com"; rawEdge.fromText(new Text(badRow)); }
@Test(expected=IOException.class) public void testBadData() throws IOException{ rawEdge = new RawEdge(",",""); String badData = "asdfhwuhufnwsk"; rawEdge.fromText(new Text(badData)); }
@Test(expected=IOException.class) public void testEmptyFields() throws IOException { rawEdge = new RawEdge(",", ""); String badRow = "fancy.email@gmail.com,,"; rawEdge.fromText(new Text(badRow)); }