Offer implements VirtualMachineLease { @Override public double memoryMB() { return memoryMB; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); @Override double memoryMB(); @Override double networkMbps(); @Override double diskMB(); Protos.Offer getOffer(); @Override String getId(); @Override long getOfferedTime(); @Override List<Range> portRanges(); @Override Map<String, Protos.Attribute> getAttributeMap(); @Override String toString();  }
@Test public void testMemoryMB() { Offer offer = new Offer(offer(resources(mem(1024.0)), attrs())); Assert.assertEquals(1024.0, offer.memoryMB(), EPSILON); }