Added Specs for IR and renamed a method in Vertex.java

1) Added specs for methods in Vertex.java
2) Rename getSingleEdge to getFirstEdge as that's the purpose of that method.