@Test public void isStorageOfferAvailableOK() throws Exception { final StorageOffer offer = new StorageOffer(); offer.setParameters(new HashMap<>()); offer.getParameters().put("s", "s"); offer.setId("FakeOffer"); assertEquals(true, driver.isStorageOfferAvailable(offer.getId())); }
@Override public boolean isStorageOfferAvailable(String offerId) throws StorageDriverException { if (offerId.contains("fail")) { throw new StorageDriverException(getName(), "Intentionaly thrown", false); } return true; }
FakeDriverImpl extends AbstractDriver { @Override public boolean isStorageOfferAvailable(String offerId) throws StorageDriverException { if (offerId.contains("fail")) { throw new StorageDriverException(getName(), "Intentionaly thrown", false); } return true; } }
FakeDriverImpl extends AbstractDriver { @Override public boolean isStorageOfferAvailable(String offerId) throws StorageDriverException { if (offerId.contains("fail")) { throw new StorageDriverException(getName(), "Intentionaly thrown", false); } return true; }  }
FakeDriverImpl extends AbstractDriver { @Override public boolean isStorageOfferAvailable(String offerId) throws StorageDriverException { if (offerId.contains("fail")) { throw new StorageDriverException(getName(), "Intentionaly thrown", false); } return true; }  @Override Connection connect(String offerId); @Override boolean isStorageOfferAvailable(String offerId); @Override String getName(); @Override int getMajorVersion(); @Override int getMinorVersion(); }
FakeDriverImpl extends AbstractDriver { @Override public boolean isStorageOfferAvailable(String offerId) throws StorageDriverException { if (offerId.contains("fail")) { throw new StorageDriverException(getName(), "Intentionaly thrown", false); } return true; }  @Override Connection connect(String offerId); @Override boolean isStorageOfferAvailable(String offerId); @Override String getName(); @Override int getMajorVersion(); @Override int getMinorVersion();  }