### Question:
GcpComputePlatform extends Platform implements SshBasedExperiment<GcpComputeInstanceContainer> { private boolean isContainerRegionGroupAtDesiredCapacity (GcpComputeInstanceContainer container) { String group = getContainerGroup(container); ProjectRegionInstanceGroupManagerName projectRegionInstanceGroupManagerName = ProjectRegionInstanceGroupManagerName .parse(group); ProjectRegionInstanceGroupName projectRegionInstanceGroupName = ProjectRegionInstanceGroupName.of( projectRegionInstanceGroupManagerName.getInstanceGroupManager(), projectRegionInstanceGroupManagerName.getProject(), projectRegionInstanceGroupManagerName.getRegion()); Integer actualSize = getRegionInstanceGroupClient().getRegionInstanceGroup(projectRegionInstanceGroupName) .getSize(); Integer targetSize = getRegionInstanceGroupManagerClient().getRegionInstanceGroupManager( projectRegionInstanceGroupManagerName).getTargetSize(); log.debug("For group {}, {}, {}", group, kv("actualSize", actualSize), kv("targetSize", targetSize)); return targetSize.compareTo(actualSize) <= 0; }  void setRoutableCIDRBlocks(Collection<String> routableCIDRBlocks); @Override ApiStatus getApiStatus(); @Override PlatformLevel getPlatformLevel(); @Override PlatformHealth getPlatformHealth(); Collection<Items> getIncludeFilter(); void setIncludeFilter(Map<String, String> includeFilter); Collection<Items> getExcludeFilter(); void setExcludeFilter(Map<String, String> excludeFilter); @Override boolean isContainerRecycled(Container container); String stopInstance(GcpComputeInstanceContainer container); ContainerHealth isContainerRunning(GcpComputeInstanceContainer gcpComputeInstanceContainer); String simulateMaintenance(GcpComputeInstanceContainer container); String setTags(GcpComputeInstanceContainer container, List<String> tags); String setTagsSafe(GcpComputeInstanceContainer container, List<String> newTags, String oldFingerprint); boolean isContainerGroupAtCapacity(GcpComputeInstanceContainer container); boolean checkTags(GcpComputeInstanceContainer container, List<String> expectedTags); void startInstance(GcpComputeInstanceContainer container); String restartContainer(GcpComputeInstanceContainer container); String getBestEndpoint(String privateIPAddress, String publicIPAddress); boolean isAddressRoutable(String privateIPAddress); String getLatestInstanceId(String instanceName, String zone); Fingerprint<List<String>> getFirewallTags(GcpComputeInstanceContainer container); void setProjectId(String projectId); @Override String getEndpoint(GcpComputeInstanceContainer container); @Override SSHCredentials getSshCredentials(GcpComputeInstanceContainer container); @Override String getRunningDirectory(); @Override void recycleContainer(GcpComputeInstanceContainer container); String recreateInstanceInInstanceGroup(GcpComputeInstanceContainer container); boolean isOperationComplete(String operationId);  }### Answer:
@Test public void isContainerRegionGroupAtDesiredCapacity () { final String INSTANCE_GROUP = "12345"; final String PROJECT = "54321"; final String ZONE = "my-datacenter"; GcpComputeInstanceContainer container = GcpComputeInstanceContainer.builder() .withCreatedBy( ProjectRegionInstanceGroupManagerName .of(INSTANCE_GROUP, PROJECT, ZONE) .toString() .substring( ProjectRegionInstanceGroupManagerName.SERVICE_ADDRESS .length() - "projects/" .length())) .build(); InstanceGroup instanceGroup = InstanceGroup.newBuilder().setSize(10).build(); InstanceGroupManager instanceGroupManager = InstanceGroupManager.newBuilder().setTargetSize(10).build(); doReturn(instanceGroup).when(regionInstanceGroupClient) .getRegionInstanceGroup(ProjectRegionInstanceGroupName.of(INSTANCE_GROUP, PROJECT, ZONE)); doReturn(instanceGroupManager).when(regionInstanceGroupManagerClient) .getRegionInstanceGroupManager(ProjectRegionInstanceGroupManagerName.of( INSTANCE_GROUP, PROJECT, ZONE)); assertTrue(gcpComputePlatform.isContainerGroupAtCapacity(container)); }