createNiceMock(Throwable.class), error);
expect(machine.getNetworkAdapter(slotId))
.andThrow(invalidSlotException);
replay(machine, iNetworkAdapter, natEngine);
NetworkAdapter networkAdapter = NetworkAdapter.builder()
.networkAttachmentType(NetworkAttachmentType.NAT)
.tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard
.builder().addNetworkAdapter(networkAdapter).build();
new AttachNATAdapterToMachineIfNotAlreadyExists(networkInterfaceCard)