Skip to content

Instantly share code, notes, and snippets.

@mcsee
Created February 21, 2026 01:04
Show Gist options
  • Select an option

  • Save mcsee/d1ce286510fba9e65b0be88bf617f9cd to your computer and use it in GitHub Desktop.

Select an option

Save mcsee/d1ce286510fba9e65b0be88bf617f9cd to your computer and use it in GitHub Desktop.
public class NearEarthObject {
private double energy;
private double probability;
public String getStatusDescription() {
int level = calculateTorinoLevel();
String key = "LEVEL_" + level;
// You are calling a global static function
// This makes the object hard to test
return GlobalTranslator.translate(key);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment