### Question:
Datasets { public static boolean moveToTrash(URI uri) { return deleteWithTrash(uri, true); }  @SuppressWarnings("unchecked") static V load(URI uri, Class<E> type); @SuppressWarnings("unchecked") static V load(URI uri); static V load(String uriString, Class<E> type); static V load(String uriString); @SuppressWarnings("unchecked") static V create(URI uri, DatasetDescriptor descriptor, Class<E> type); @SuppressWarnings("unchecked") static V create(URI uri, DatasetDescriptor descriptor); static V create(String uri, DatasetDescriptor descriptor, Class<E> type); @SuppressWarnings("unchecked") static V create(String uri, DatasetDescriptor descriptor); @SuppressWarnings("unchecked") static D update(
      URI uri, DatasetDescriptor descriptor, Class<E> type); @SuppressWarnings("unchecked") static D update(
      URI uri, DatasetDescriptor descriptor); static D update(String uri, DatasetDescriptor descriptor, Class<E> type); static D update(String uri, DatasetDescriptor descriptor); static boolean delete(URI uri); static boolean delete(String uri); static boolean moveToTrash(URI uri); static boolean moveToTrash(String uri); static boolean exists(URI uri); static boolean exists(String uri); static Collection<URI> list(URI uri); static Collection<URI> list(String uri);  }### Answer:
@Test public void testMoveToTrash() { URI datasetUri = new URIBuilder(repoUri, "ns", "test").build(); Datasets.moveToTrash(datasetUri); verify(repo).moveToTrash("ns", "test"); verifyNoMoreInteractions(repo); }
@Test public void testMoveToTrashStringUri() { URI datasetUri = new URIBuilder(repoUri, "ns", "test").build(); Datasets.moveToTrash(datasetUri.toString()); verify(repo).moveToTrash("ns", "test"); verifyNoMoreInteractions(repo); }
@Test public void testMoveToTrashRejectsViewUri() { final URI datasetUri = new URIBuilder(repoUri, "ns", "test") .with("field", 34) .build(); TestHelpers.assertThrows("Should reject view URI", IllegalArgumentException.class, new Runnable() { @Override public void run() { Datasets.moveToTrash(datasetUri); } }); verifyNoMoreInteractions(repo); }