DBInstanceImpl implements DBInstance { @Override public String getPath() { return instanceMeta.getPath(); } DBInstanceImpl(StorageServiceFactory storageServiceFactory, MetadataStore metadataStore, Instance instanceMeta); @Override String getInstanceId(); @Override List<Bag> getBags(); @Override Bag getBag(String bagName); @Override void removeBag(String bagName); @Override String getPath();  }
@Test public void testGetPath() { when(instanceMeta.getPath()).thenReturn("/some/path"); DBInstanceImpl dbInstance = new DBInstanceImpl(storageServiceFactory, metadataStore, instanceMeta); assertThat(dbInstance.getPath(), is("/some/path")); }