@Test
public void testCreatePortApiExceptionInModify() throws ConfigurationException, BigSwitchVnsApiException {
_resource.configure("BigSwitchVnsResource", _parameters);
Port networkp = mock(Port.class);
when(networkp.getId()).thenReturn("eeee");
doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).modifyPortAttachment((String)any(), (String)any(), (String)any(), (Attachment)any());
CreateVnsPortCommand cntkc = new CreateVnsPortCommand("networkid", "portid", "tenantid", "portname", "aa:bb:cc:dd:ee:ff");
CreateVnsPortAnswer cntka = (CreateVnsPortAnswer) _resource.executeRequest(cntkc);
assertFalse(cntka.getResult());