### Question:
StandardMapWorkspace extends MapWorkspace<NodeType> { @Override public NodeType removeNode( UUID uuid ) { return rootNodeUuid.equals(uuid) ? null : nodesByUuid.remove(uuid); } StandardMapWorkspace( String name,
                         Map<UUID, NodeType> nodesByUuid,
                         NodeType rootNode );  StandardMapWorkspace( String name,
                         Map<UUID, NodeType> nodesByUuid,
                         StandardMapWorkspace<NodeType> originalToClone ); @Override NodeType getNode( UUID uuid ); @Override NodeType putNode( NodeType node ); @Override NodeType removeNode( UUID uuid ); @Override @SuppressWarnings( "unchecked" ) void removeAll();  }### Answer:
@Test public void shouldRemoveNodes() { for (MapNode node : addNodes(10)) { assertThat(workspace.removeNode(node.getUuid()), is(sameInstance(node))); } assertThat(store.size(), is(1)); assertThat(store.get(rootUuid), is(sameInstance(workspace.getRootNode()))); }
@Test public void shouldNotRemoveRootNode() { assertThat(workspace.removeNode(rootUuid), is(nullValue())); assertThat(store.containsKey(rootUuid), is(true)); assertThat(workspace.getRootNode(), is(sameInstance(store.get(rootUuid)))); }