/** * Test that the get on the {@link LeafWithNoDescriptors} will throw an exception if invoked. * * @throws IndexingException * If {@link IndexingException} occurs. */ @Test(expectedExceptions = { UnsupportedOperationException.class }) public void putAndGetElement() throws IndexingException { IStorageTreeComponent<DefaultData> rootBranch = new LeafWithNoDescriptors<>(); DefaultData defaultData = mock(DefaultData.class); when(defaultData.getId()).thenReturn(1L); rootBranch.put(defaultData); rootBranch.get(defaultData); }
return new LeafWithNoDescriptors<>(id); } else { return new LeafWithNoDescriptors<>();
LeafWithNoDescriptors<DefaultData> leafWithNoDescriptors = new LeafWithNoDescriptors<>();