test_class.declarator: manager = mock(ClusterDiskSpaceManager.class)
test_class.modifier: private final
test_class.original_string: private final ClusterDiskSpaceManager manager = mock(ClusterDiskSpaceManager.class);
test_class.type: ClusterDiskSpaceManager
test_class.var_name: manager
test_class.declarator: serverNames = new String[]{"server1", "server2"}
test_class.modifier: private final
test_class.original_string: private final String[] serverNames = new String[]{"server1", "server2"};
test_class.type: String[]
test_class.var_name: serverNames
test_class.declarator: servers = new LinkedHashSet<>(Arrays.asList(serverNames))
test_class.modifier: private final
test_class.original_string: private final Set<String> servers = new LinkedHashSet<>(Arrays.asList(serverNames));
test_class.type: Set<String>
test_class.var_name: servers
test_class.declarator: diskSpaceMap = new HashMap<>()
test_class.modifier: private final
test_class.original_string: private final Map<String, DiskSpace> diskSpaceMap = new HashMap<>();
test_class.type: Map<String, DiskSpace>
test_class.var_name: diskSpaceMap
test_class.declarator: healthCheck
test_class.modifier: private
test_class.original_string: private ClusterDiskSpaceManagerHealthCheck healthCheck;
test_class.type: ClusterDiskSpaceManagerHealthCheck
test_class.var_name: healthCheck
test_class.file: harahachibu/src/test/java/uk/co/flax/harahachibu/health/ClusterDiskSpaceManagerHealthCheckTest.java
test_class.identifier: ClusterDiskSpaceManagerHealthCheckTest
test_case.body: @Test
  	public void returnsHealthyWhenDiskStatsAvailable() throws Exception {
  		diskSpaceMap.put(serverNames[0], new DiskSpace(123L, 1024L));
  		diskSpaceMap.put(serverNames[1], new DiskSpace(456L, 4560L));
  
  		HealthCheck.Result result = healthCheck.check();
  		assertThat(result.isHealthy()).isTrue();
  	}
test_case.class_method_signature: ClusterDiskSpaceManagerHealthCheckTest.returnsHealthyWhenDiskStatsAvailable()
test_case.full_signature: @Test public void returnsHealthyWhenDiskStatsAvailable()
test_case.identifier: returnsHealthyWhenDiskStatsAvailable
test_case.invocations: put put check isTrue assertThat isHealthy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void returnsHealthyWhenDiskStatsAvailable()
focal_class.declarator: EXPIRY_TIME_MINS = 5
focal_class.modifier: static final
focal_class.original_string: static final int EXPIRY_TIME_MINS = 5;
focal_class.type: int
focal_class.var_name: EXPIRY_TIME_MINS
focal_class.declarator: manager
focal_class.modifier: private final
focal_class.original_string: private final ClusterDiskSpaceManager manager;
focal_class.type: ClusterDiskSpaceManager
focal_class.var_name: manager
focal_class.file: harahachibu/src/main/java/uk/co/flax/harahachibu/health/ClusterDiskSpaceManagerHealthCheck.java
focal_class.identifier: ClusterDiskSpaceManagerHealthCheck
focal_class.class_method_signature: ClusterDiskSpaceManagerHealthCheck.ClusterDiskSpaceManagerHealthCheck(ClusterDiskSpaceManager manager)
focal_class.full_signature: public  ClusterDiskSpaceManagerHealthCheck(ClusterDiskSpaceManager manager)
focal_class.identifier: ClusterDiskSpaceManagerHealthCheck
focal_class.modifiers: public
focal_class.parameters: (ClusterDiskSpaceManager manager)
focal_class.signature:  ClusterDiskSpaceManagerHealthCheck(ClusterDiskSpaceManager manager)
focal_class.class_method_signature: ClusterDiskSpaceManagerHealthCheck.check()
focal_class.full_signature: @Override protected Result check()
focal_class.identifier: check
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: Result
focal_class.signature: Result check()
focal_class.superclass: extends HealthCheck
focal_method.body: @Override
  	protected Result check() throws Exception {
  		final Result result;
  
  		StringBuilder message = new StringBuilder();
  		boolean healthy = true;
  
  		for (String server : manager.getServers()) {
  			if (message.length() > 0) {
  				message.append("; ");
  			}
  			if (manager.getDiskSpace().get(server) == null) {
  				message.append(server).append(" : no disk space recorded");
  				healthy = false;
  			} else {
  				DiskSpace disk = manager.getDiskSpace().get(server);
  				Date checkDate = new Date(System.currentTimeMillis() - (EXPIRY_TIME_MINS * 60 * 1000));
  				long updateInterval = (System.currentTimeMillis() - disk.getCreationDate().getTime()) / 1000;
  				if (disk.getCreationDate().before(checkDate)) {
  					healthy = false;
  				}
  				message.append(server).append(" : last updated ").append(updateInterval).append(" seconds ago");
  			}
  		}
  		message.append(".");
  
  		if (healthy) {
  			result = Result.healthy(message.toString());
  		} else {
  			result = Result.unhealthy(message.toString());
  		}
  
  		return result;
  	}
focal_method.class_method_signature: ClusterDiskSpaceManagerHealthCheck.check()
focal_method.full_signature: @Override protected Result check()
focal_method.identifier: check
focal_method.invocations: getServers length append get getDiskSpace append append get getDiskSpace currentTimeMillis currentTimeMillis getTime getCreationDate before getCreationDate append append append append append healthy toString unhealthy toString
focal_method.modifiers: @Override protected
focal_method.parameters: ()
focal_method.return: Result
focal_method.signature: Result check()