@@ -0,0 +1,1056 @@
+package us.kbase.workspace.test.workspace;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.nullValue;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.fail;%0A%0Aimport org.junit.Test;%0A%0Aimport us.kbase.common.test.TestCommon;%0Aimport us.kbase.workspace.database.Provenance;%0Aimport us.kbase.workspace.database.WorkspaceUser;%0A%0Apublic class ProvenanceTest %7B%0A%09%0A%09//TODO TEST add more tests%0A%09%0A%09@Test%0A%09public void setAndGetWorkspaceID() throws Exception %7B%0A%09%09final Provenance p = new Provenance(new WorkspaceUser(%22u%22));%0A%09%09%0A%09%09p.setWorkspaceID(1L);%0A%09%09assertThat(%22incorrect wsid%22, p.getWorkspaceID(), is(1L));%0A%09%09%0A%09%09p.setWorkspaceID(null);%0A%09%09assertThat(%22incorrect wsid%22, p.getWorkspaceID(), is(nullValue()));%0A%09%7D%0A%09%0A%09@Test%0A%09public void failSetWorkspaceID() throws Exception %7B%0A%09%09try %7B%0A%09%09%09new Provenance(new WorkspaceUser(%22u%22)).setWorkspaceID(0L);%0A%09%09%09fail(%22expected exception%22);%0A%09%09%7D catch (Exception got) %7B%0A%09%09%09TestCommon.assertExceptionCorrect(got,%0A%09%09%09%09%09new IllegalArgumentException(%22wsid must be %3E 0%22));%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Add more tests for setWorkspaceID in provenance