Processor extends ResourceManageableAbstract { @Override public boolean setCapacity(long numberOfPes) { if(numberOfPes <= 0){ throw new IllegalArgumentException("The Processor's number of PEs must be greater than 0."); } return super.setCapacity(numberOfPes); } Processor(Vm vm, double pesMips, long numberOfPes); private  Processor(); double getTotalMips(); double getMips(); void setMips(final double newMips); @Override long getCapacity(); @Override long getAvailableResource(); @Override long getAllocatedResource(); @Override boolean setCapacity(long numberOfPes); Vm getVm(); static final Processor NULL; }
@Test public void testSetCapacity() { final long expResult = (long)PE_MIPS*2; final Processor instance = createDefaultProcessor(); instance.setMips(expResult); assertEquals(expResult, instance.getMips()); }