### Question:
CopyBranchRequest extends ChangeRequest { public boolean isSameWorkspace() { return fromWorkspace.equals(intoWorkspace); } CopyBranchRequest( Location from,
                              String fromWorkspace,
                              Location into,
                              String intoWorkspace );  CopyBranchRequest( Location from,
                              String fromWorkspace,
                              Location into,
                              String intoWorkspace,
                              Name nameForCopy );  CopyBranchRequest( Location from,
                              String fromWorkspace,
                              Location into,
                              String intoWorkspace,
                              Name nameForCopy,
                              NodeConflictBehavior nodeConflictBehavior ); Location from(); Location into(); String fromWorkspace(); String intoWorkspace(); boolean isSameWorkspace(); Name desiredName(); @Override boolean isReadOnly(); NodeConflictBehavior nodeConflictBehavior(); void setActualLocations( Location fromLocation,
                                    Location intoLocation ); Location getActualLocationBefore(); Location getActualLocationAfter(); @Override boolean changes( String workspace,
                            Path path ); @Override Location changedLocation(); @Override String changedWorkspace(); @Override int hashCode(); @Override void cancel(); @Override boolean equals( Object obj ); @Override String toString(); @Override CopyBranchRequest clone(); @Override RequestType getType(); static final NodeConflictBehavior DEFAULT_NODE_CONFLICT_BEHAVIOR; }### Answer:
@Test public void shouldConsiderRequestsToBeInSameWorkspaceIfFromAndToWorkspaceNamesMatch() { request = new CopyBranchRequest(validPathLocation1, workspace1, validPathLocation2, new String(workspace1)); assertThat(request.isSameWorkspace(), is(true)); }
@Test public void shouldConsiderRequestsToNotBeInSameWorkspaceIfFromAndToWorkspaceNamesDoNotMatch() { request = new CopyBranchRequest(validPathLocation1, workspace1, validPathLocation2, workspace2); assertThat(request.isSameWorkspace(), is(false)); }