### Question:
FederatedWorkspace { Map<String, List<Projection>> getProjectionsBySourceName() { return projectionsBySourceName; } FederatedWorkspace( RepositoryContext repositoryContext,
                               String sourceName,
                               String workspaceName,
                               Iterable<Projection> projections,
                               CachePolicy cachePolicy ); RepositoryContext getRepositoryContext(); String getSourceName(); String getName(); CachePolicy getCachePolicy(); Problems getProblems(); List<Projection> getProjections(); boolean contains( String sourceName,
                             String workspaceName ); ProjectedNode project( ExecutionContext context,
                                  Location location,
                                  boolean requiresUpdate ); @Override int hashCode(); @Override boolean equals( Object obj );  }### Answer:
@Test public void shouldHaveCorrectMappingOfProjectionsBySource() { assertThat(workspace.getProjectionsBySourceName().get("source1"), is(projections.subList(0, 1))); assertThat(workspace.getProjectionsBySourceName().get("source2"), is(projections.subList(1, 3))); assertThat(workspace.getProjectionsBySourceName().get("source3"), is(projections.subList(3, 4))); }