Context context = null;
String testSshKeyName = "fake-ssh-key";
Calendar testCreationTime = Calendar.getInstance();
testCreationTime.setTimeInMillis(424242424242l);
String testNIC = "FakeName;FakeAssociation;FAKEMAC;NetMode;IPmethod;192.168.1.42;192.168.1.1;192.168.1.2;subnetmask;dns;hostname;null;null;null;null";
VirtualMachine testVM = new VirtualMachine();
testVM.setID(42);
testVM.setName("fakename");
testVM.setNetwork(testNIC);
testVM.setPropagateRequired(false);
testVM.setUnPropagateRequired(true);
VirtualMachine[] testBindings = new VirtualMachine[1];
testBindings[0] = testVM;
int testAllocatedVM = 42;
DataConvert dataConvert = new DataConvert(this.locator.getReprFactory());
NIC[] testNICs = dataConvert.getNICs(testVM);
logger.debug("Nics: " + testNICs[0]);
//public AsyncRequest(String id, boolean spotinstances, Double spotPrice, boolean persistent, Caller caller, String groupID, VirtualMachine[] bindings, Context context, NIC[] requestedNics, String sshKeyName, Calendar creationTime) {
AsyncRequest testRequest = new AsyncRequest(testID, testSpotinstances, testMaxBid, testIsPersistent, testCaller, testGroupID, testBindings, context, testNICs, testSshKeyName, testCreationTime);
testRequest.addAllocatedVM(testAllocatedVM);
asyncRequestMap.addOrReplace(testRequest);
String secondID = "this-is-the-other-one";
double secondMaxBid = 4.5;
VirtualMachine[] secondBindings = new VirtualMachine[1];
VirtualMachine secondVM = new VirtualMachine();
secondVM.setID(52);
secondBindings[0] = secondVM;
AsyncRequest secondRequest = new AsyncRequest(secondID, testSpotinstances, secondMaxBid, testIsPersistent, testCaller, testGroupID, secondBindings, context, testNICs, testSshKeyName, testCreationTime);
allRequests = asyncRequestMap.getAll();