### Question:
ManagementView extends AbstractView { @VisibleForTesting Optional<Layout> getLayoutFromQuorum(@Nonnull Map<String, Layout> layoutMap, int quorum) { Map<Layout, Integer> uniqueLayoutMap = new HashMap<>(); for (Layout nodeLayout : layoutMap.values()) { int layoutsSum = uniqueLayoutMap.getOrDefault(nodeLayout, 0) + 1; uniqueLayoutMap.put(nodeLayout, layoutsSum); } return uniqueLayoutMap .entrySet() .stream() .filter(uniqueLayout -> uniqueLayout.getValue() >= quorum) .max(Comparator.comparingInt(Entry::getValue)) .map(Entry::getKey); } ManagementView(@NonNull CorfuRuntime runtime); void removeNode(@Nonnull String endpointToRemove, int retry,
                           @Nonnull Duration timeout, @Nonnull Duration pollPeriod); void forceRemoveNode(@Nonnull String endpointToRemove, int retry,
                                @Nonnull Duration timeout, @Nonnull Duration pollPeriod); void addNode(@Nonnull String endpointToAdd, int retry,
                        @Nonnull Duration timeout, @Nonnull Duration pollPeriod); void healNode(@Nonnull String endpointToHeal, int retry, @Nonnull Duration timeout,
                         @Nonnull Duration pollPeriod); void mergeSegments(@Nonnull String endpointToRestoreRedundancy, int retry, @Nonnull Duration timeout,
                              @Nonnull Duration pollPeriod); ClusterStatusReport getClusterStatus(); CompletableFuture<Boolean> bootstrapManagementServer(@Nonnull String endpoint, @Nonnull Layout layout);  }### Answer:
@Test public void testGetLayoutForQuorum() { final String server1 = "server1"; final String server2 = "server2"; final String server3 = "server3"; final List<String> servers = Arrays.asList(server1, server2, server3); final Layout layout = layoutUtil.getLayout(servers); Map<String, Layout> layouts = new HashMap<>(); servers.forEach(server -> layouts.put(server, layout)); Optional<Layout> quorumLayout = managementView.getLayoutFromQuorum(layouts, layouts.size() - 1); assertThat(quorumLayout).isEqualTo(Optional.of(layout)); quorumLayout = managementView.getLayoutFromQuorum(layouts, layouts.size()); assertThat(quorumLayout).isEqualTo(Optional.of(layout)); quorumLayout = managementView.getLayoutFromQuorum(layouts, layouts.size() + 1); assertThat(quorumLayout).isEqualTo(Optional.empty()); }