Skip to content

Instantly share code, notes, and snippets.

@htrajan
Last active June 28, 2018 23:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save htrajan/bb5934bf473fe73108f0cb8abdc005eb to your computer and use it in GitHub Desktop.
public class AccountSavingsRecommender {
@Inject RetirementGoalSavingsAllocator retirementAllocator;
@VisibleForTesting
Map<Goal, Double> computePvByGoal(Collection<Goal> goals) {...}
……
@VisibleForTesting
Map<Goal, Double> allocateSavingsToGoals(
double savingsToAllocate,
Map<Goal, Double> savingsNeededByGoal) {...}
}
public class AccountSavingsRecommenderTest {
@Test
public void computePvByGoal_retirement() {...}
@Test
public void computePvByGoal_home() {...}
@Test
public void allocateSavingsToGoals_noSavingsToAllocate() {...}
@Test
public void allocateSavingsToGoals_excessSavingsToAllocate() {...}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment