[dna-commits] DNA SVN: r422 - trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Wed Aug 13 13:54:03 EDT 2008


Author: rhauch
Date: 2008-08-13 13:54:03 -0400 (Wed, 13 Aug 2008)
New Revision: 422

Added:
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ActsOnProjectedPathCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyBranchCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyNodeCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedDeleteBranchCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetChildrenCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetNodeCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetPropertiesCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedMoveBranchCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedRecordBranchCommandTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedSetPropertiesCommandTest.java
Log:
DNA-188 - Complete the federating command executor
http://jira.jboss.com/jira/browse/DNA-188

Added tests for the projection commands.

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ActsOnProjectedPathCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ActsOnProjectedPathCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ActsOnProjectedPathCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.commands.GetNodeCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ActsOnProjectedPathCommandTest {
+
+    private ActsOnProjectedPathCommand<GetNodeCommand> command;
+    @Mock
+    private GetNodeCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ActsOnProjectedPathCommand<GetNodeCommand>(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ActsOnProjectedPathCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyBranchCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyBranchCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyBranchCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.commands.CopyBranchCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedCopyBranchCommandTest {
+    private ProjectedCopyBranchCommand command;
+    @Mock
+    private CopyBranchCommand wrapped;
+    @Mock
+    private Path projectedPath;
+    @Mock
+    private Path newProjectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedCopyBranchCommand(wrapped, projectedPath, newProjectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldReturnNewProjectedPathForNewPath() {
+        assertThat(command.getNewPath(), is(sameInstance(newProjectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyBranchCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyNodeCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyNodeCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyNodeCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.commands.CopyNodeCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedCopyNodeCommandTest {
+    private ProjectedCopyNodeCommand command;
+    @Mock
+    private CopyNodeCommand wrapped;
+    @Mock
+    private Path projectedPath;
+    @Mock
+    private Path newProjectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedCopyNodeCommand(wrapped, projectedPath, newProjectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldReturnNewProjectedPathForNewPath() {
+        assertThat(command.getNewPath(), is(sameInstance(newProjectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedCopyNodeCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedDeleteBranchCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedDeleteBranchCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedDeleteBranchCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.commands.DeleteBranchCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedDeleteBranchCommandTest {
+    private ProjectedDeleteBranchCommand command;
+    @Mock
+    private DeleteBranchCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedDeleteBranchCommand(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedDeleteBranchCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetChildrenCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetChildrenCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetChildrenCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.cache.CachePolicy;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.Property;
+import org.jboss.dna.spi.graph.commands.GetChildrenCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedGetChildrenCommandTest {
+    private ProjectedGetChildrenCommand command;
+    @Mock
+    private GetChildrenCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedGetChildrenCommand(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldSetCachePolicyOnOriginalCommand() {
+        CachePolicy value = mock(CachePolicy.class);
+        command.setCachePolicy(value);
+        verify(wrapped).setCachePolicy(value);
+    }
+
+    @Test
+    public void shouldSetNoChildrenOnOriginalCommand() {
+        command.setNoChildren();
+        verify(wrapped).setNoChildren();
+    }
+
+    @Test
+    public void shouldAddChildrenOnOriginalCommand() {
+        Path.Segment segment = mock(Path.Segment.class);
+        Property[] properties = new Property[] {};
+        command.addChild(segment, properties);
+        verify(wrapped).addChild(segment, properties);
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetChildrenCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetNodeCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetNodeCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetNodeCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.cache.CachePolicy;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.Property;
+import org.jboss.dna.spi.graph.commands.GetNodeCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedGetNodeCommandTest {
+    private ProjectedGetNodeCommand command;
+    @Mock
+    private GetNodeCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedGetNodeCommand(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldSetCachePolicyOnOriginalCommand() {
+        CachePolicy value = mock(CachePolicy.class);
+        command.setCachePolicy(value);
+        verify(wrapped).setCachePolicy(value);
+    }
+
+    @Test
+    public void shouldSetPropertyOnOriginalCommand() {
+        Property property = mock(Property.class);
+        command.setProperty(property);
+        verify(wrapped).setProperty(property);
+    }
+
+    @Test
+    public void shouldSetNoChildrenOnOriginalCommand() {
+        command.setNoChildren();
+        verify(wrapped).setNoChildren();
+    }
+
+    @Test
+    public void shouldAddChildrenOnOriginalCommand() {
+        Path.Segment segment = mock(Path.Segment.class);
+        Property[] properties = new Property[] {};
+        command.addChild(segment, properties);
+        verify(wrapped).addChild(segment, properties);
+    }
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetNodeCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetPropertiesCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetPropertiesCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetPropertiesCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.cache.CachePolicy;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.Property;
+import org.jboss.dna.spi.graph.commands.GetPropertiesCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedGetPropertiesCommandTest {
+    private ProjectedGetPropertiesCommand command;
+    @Mock
+    private GetPropertiesCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedGetPropertiesCommand(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldSetCachePolicyOnOriginalCommand() {
+        CachePolicy value = mock(CachePolicy.class);
+        command.setCachePolicy(value);
+        verify(wrapped).setCachePolicy(value);
+    }
+
+    @Test
+    public void shouldSetPropertyOnOriginalCommand() {
+        Property property = mock(Property.class);
+        command.setProperty(property);
+        verify(wrapped).setProperty(property);
+    }
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedGetPropertiesCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedMoveBranchCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedMoveBranchCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedMoveBranchCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.commands.MoveBranchCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedMoveBranchCommandTest {
+    private ProjectedMoveBranchCommand command;
+    @Mock
+    private MoveBranchCommand wrapped;
+    @Mock
+    private Path projectedPath;
+    @Mock
+    private Path newProjectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedMoveBranchCommand(wrapped, projectedPath, newProjectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldReturnNewProjectedPathForNewPath() {
+        assertThat(command.getNewPath(), is(sameInstance(newProjectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedMoveBranchCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedRecordBranchCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedRecordBranchCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedRecordBranchCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.commands.RecordBranchCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedRecordBranchCommandTest {
+    private ProjectedRecordBranchCommand command;
+    @Mock
+    private RecordBranchCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedRecordBranchCommand(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedRecordBranchCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedSetPropertiesCommandTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedSetPropertiesCommandTest.java	                        (rev 0)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedSetPropertiesCommandTest.java	2008-08-13 17:54:03 UTC (rev 422)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.connector.federation.executor;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsSame.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.stub;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import java.util.ArrayList;
+import java.util.Collection;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.Property;
+import org.jboss.dna.spi.graph.commands.SetPropertiesCommand;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoAnnotations.Mock;
+
+/**
+ * @author Randall Hauch
+ */
+public class ProjectedSetPropertiesCommandTest {
+    private ProjectedSetPropertiesCommand command;
+    @Mock
+    private SetPropertiesCommand wrapped;
+    @Mock
+    private Path projectedPath;
+
+    @Before
+    public void beforeEach() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        command = new ProjectedSetPropertiesCommand(wrapped, projectedPath);
+    }
+
+    @Test
+    public void shouldReturnProjectedPath() {
+        assertThat(command.getPath(), is(sameInstance(projectedPath)));
+        verifyZeroInteractions(wrapped);
+    }
+
+    @Test
+    public void shouldReturnErrorFromWrappedCommands() {
+        Throwable error = mock(Throwable.class);
+        stub(wrapped.getError()).toReturn(error);
+        assertThat(command.getError(), is(error));
+        verify(wrapped).getError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForError() {
+        assertThat(command.hasError(), is(false));
+        verify(wrapped).hasError();
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForNoError() {
+        stub(wrapped.hasNoError()).toReturn(true);
+        assertThat(command.hasNoError(), is(true));
+        verify(wrapped).hasNoError();
+    }
+
+    @Test
+    public void shouldSetErrorOnWrappedCommand() {
+        Throwable error = mock(Throwable.class);
+        command.setError(error);
+        verify(wrapped).setError(error);
+    }
+
+    @Test
+    public void shouldCheckWrappedCommandForCancellation() {
+        stub(wrapped.isCancelled()).toReturn(true);
+        assertThat(command.isCancelled(), is(true));
+        verify(wrapped).isCancelled();
+    }
+
+    @Test
+    public void shouldReturnWrappedCommandAsOriginalCommand() {
+        assertThat(command.getOriginalCommand(), is(sameInstance(wrapped)));
+    }
+
+    @Test
+    public void shouldReturnPropertyIteratorFromOriginalCommand() {
+        Collection<Property> properties = new ArrayList<Property>();
+        stub(wrapped.getProperties()).toReturn(properties);
+        assertThat(command.getProperties(), is(sameInstance(properties)));
+        verify(wrapped).getProperties();
+    }
+}


Property changes on: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/executor/ProjectedSetPropertiesCommandTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the dna-commits mailing list