### Question:
JRobinDirectoryUtil { public String getInterfaceDirectory(String snmpifname, String snmpifdescr, String snmpphysaddr) { return RrdLabelUtils.computeLabelForRRD(snmpifname, snmpifdescr, snmpphysaddr); }  boolean isStoreByGroup(); boolean isStoreByForeignSource(); String getNodeLevelResourceDirectory(String rrdDirectory, String nodeId, String foreignSource, String foreignId); String getIfInOctetsDataSource(String rrdDirectory, String nodeId, String iFace); String getIfInOctetsDataSource(String rrdDirectory, String nodeId, String foreignSource, String foreignId, String iFace); String getIfOutOctetsDataSource(String rrdDirectory, String nodeId, String iFace); String getIfOutOctetsDataSource(String rrdDirectory, String nodeId, String foreignSource, String foreignId, String iFace); String getIfInOctetsJrb(String rrdDirectory, String nodeId, String iFace); String getIfInOctetsJrb(String rrdDirectory, String nodeId, String foreignSource, String foreignId, String iFace); String getIfOutOctetsJrb(String rrdDirectory, String nodeId, String iFace); String getIfOutOctetsJrb(String rrdDirectory, String nodeId, String foreignSource, String foreignId, String iFace); String getInterfaceDirectory(String snmpifname, String snmpifdescr, String snmpphysaddr);  }### Answer:
@Test public void testGetInterfaceDirectory() { JRobinDirectoryUtil lookup = new JRobinDirectoryUtil(); String snmpphysaddr = "0002baaacffe"; String snmpifname = "me1"; String snmpifdescr = "me1"; assertEquals("me1-0002baaacffe", lookup.getInterfaceDirectory(snmpifname, snmpifdescr, snmpphysaddr)); }
@Test public void testGetInterfaceDirectoryNoSnmpPhysAddr() { JRobinDirectoryUtil lookup = new JRobinDirectoryUtil(); String snmpphysaddr = null; String snmpifname = "me1"; String snmpifdescr = "me1"; assertEquals("me1", lookup.getInterfaceDirectory(snmpifname, snmpifdescr, snmpphysaddr)); snmpifdescr = null; assertEquals("me1", lookup.getInterfaceDirectory(snmpifname, snmpifdescr, snmpphysaddr)); }
@Test public void testGetInterfaceDirectoryNoSnmpIfName() { JRobinDirectoryUtil lookup = new JRobinDirectoryUtil(); String snmpphysaddr = "0002baaacffe"; String snmpifname = null; String snmpifdescr = "me1"; assertEquals("me1-0002baaacffe", lookup.getInterfaceDirectory(snmpifname, snmpifdescr, snmpphysaddr)); }
@Test public void testGetInterfaceDirectoryATM() { JRobinDirectoryUtil lookup = new JRobinDirectoryUtil(); String snmpphysaddr = "00e0817xxxxx"; String snmpifname = ""; String snmpifdescr = "eth0"; assertEquals("eth0-00e0817xxxxx", lookup.getInterfaceDirectory(snmpifname, snmpifdescr, snmpphysaddr)); }