### Question:
ConfigController { @GET public Response config() { return JaxRsUtils.buildStreamingResponse(factory, new StreamingJsonResponse() { @Override public void write(final JsonGenerator json) throws IOException { final PersistedCassandraFrameworkConfiguration configuration = cluster.getConfiguration(); final CassandraFrameworkProtos.CassandraFrameworkConfiguration config = configuration.get(); json.writeStringField("frameworkName", config.getFrameworkName()); json.writeStringField("frameworkId", config.getFrameworkId()); json.writeStringField("clusterName", config.getClusterName()); json.writeNumberField("targetNumberOfNodes", config.getTargetNumberOfNodes()); json.writeNumberField("targetNumberOfSeeds", config.getTargetNumberOfSeeds()); final NodeCounts nodeCounts = cluster.getClusterState().nodeCounts(); json.writeNumberField("currentNumberOfNodes", nodeCounts.getNodeCount()); json.writeNumberField("currentNumberOfSeeds", nodeCounts.getSeedCount()); json.writeNumberField("nodesToAcquire", CassandraCluster.numberOfNodesToAcquire(nodeCounts, configuration)); json.writeNumberField("seedsToAcquire", CassandraCluster.numberOfSeedsToAcquire(nodeCounts, configuration)); final CassandraFrameworkProtos.CassandraConfigRole configRole = config.getDefaultConfigRole(); json.writeObjectFieldStart("defaultConfigRole"); JaxRsUtils.writeConfigRole(json, configRole); json.writeEndObject(); json.writeNumberField("nativePort", CassandraCluster.getPortMapping(config, CassandraCluster.PORT_NATIVE)); json.writeNumberField("rpcPort", CassandraCluster.getPortMapping(config, CassandraCluster.PORT_RPC)); json.writeNumberField("storagePort", CassandraCluster.getPortMapping(config, CassandraCluster.PORT_STORAGE)); json.writeNumberField("sslStoragePort", CassandraCluster.getPortMapping(config, CassandraCluster.PORT_STORAGE_SSL)); JaxRsUtils.writeSeedIps(cluster, json); json.writeNumberField("healthCheckIntervalSeconds", config.getHealthCheckIntervalSeconds()); json.writeNumberField("bootstrapGraceTimeSeconds", config.getBootstrapGraceTimeSeconds()); final CassandraFrameworkProtos.ClusterJobStatus currentTask = cluster.getCurrentClusterJob(); JaxRsUtils.writeClusterJob(cluster, json, "currentClusterTask", currentTask); final CassandraFrameworkProtos.ClusterJobStatus lastRepair = cluster.getLastClusterJob(CassandraFrameworkProtos.ClusterJobType.REPAIR); JaxRsUtils.writeClusterJob(cluster, json, "lastRepair", lastRepair); final CassandraFrameworkProtos.ClusterJobStatus lastCleanup = cluster.getLastClusterJob(CassandraFrameworkProtos.ClusterJobType.CLEANUP); JaxRsUtils.writeClusterJob(cluster, json, "lastCleanup", lastCleanup); json.writeNumberField("nextPossibleServerLaunchTimestamp", cluster.nextPossibleServerLaunchTimestamp()); } }); } ConfigController(@NotNull final CassandraCluster cluster, @NotNull final JsonFactory factory); @GET Response config();  }### Answer:
@Test public void testConfig() throws Exception { final Tuple2<Integer, JsonNode> tup = fetchJson("/config", false); assertEquals(200, tup._1.intValue()); final JsonNode json = tup._2; assertEquals("test-cluster", json.get("frameworkName").asText()); assertThat(json.get("frameworkId").asText()).isNotEmpty(); assertEquals(9042, json.get("nativePort").asInt()); assertEquals(9160, json.get("rpcPort").asInt()); }