Utils { protected static PhysicalPortInstance.PortType getPortType(String strType){ switch (strType){ case "external": return PhysicalPortInstance.PortType.External; } return PhysicalPortInstance.PortType.Internal; }    }
@Test public void testGetPortType() throws Exception { String strType = "external"; Assert.assertTrue(Utils.getPortType(strType) == PhysicalPortInstance.PortType.External); strType = "test"; Assert.assertTrue(Utils.getPortType(strType) == PhysicalPortInstance.PortType.Internal); }