Skip to content

Instantly share code, notes, and snippets.

View action-required.json
"actionType": "ACTION",
"title": "Check your credentials",
"subtitle": "Looks like an incorrect username or password for Vanguard.",
"cta": "Try again"
View all-on-backend.json
"banner": {"institutions": ["CHASE"], "text": "Linking in progress", "button": "Link more"},
"hub": [{"institution": "CHASE", "title": "Linking in progress", "subtitle": "This usually takes about 1 minute for Chase."}]
Account realisticRetirementAccount = RetirementAccount.builder()
public class AccountSavingsRecommenderIntegrationTest {
private static final LocalDate today = new LocalDate(2018, 6, 25);
private AccountSavingsRecommender getRecommender() {
AccountSavingsRecommender recommender = new AccountSavingsRecommender();
RetirementGoalSavingsAllocator retirementAllocator = new RetirementGoalSavingsAllocator(); = today;
RetirementAccountSelector accountSelector = new RetirementAccountSelector();
public class AccountSavingsRecommenderTest {
private final Mockery mockery = new Mockery();
private final RetirementGoalSavingsAllocator retirementAllocator = mockery.mock(RetirementGoalSavingsAllocator.class);
public void computePvByGoal_retirement() {
Account retirementAccount = TestAccountFactory.exampleRetirementAccount();
mockery.checking(new Expectations() {{
public class AccountSavingsRecommender {
@Inject RetirementGoalSavingsAllocator retirementAllocator;
Map<Goal, Double> computePvByGoal(Collection<Goal> goals) {...}
Map<Account, Double> getSavingsRecommendations(
double savingsToAllocate,
Collection<Account> accounts,
Collection<Goal> goals);
htrajan / homeAffordability
Last active Feb 12, 2018
Home Affordability
View homeAffordability
“affordability”: “MANAGEABLE”,
“mortgageAffordability”: “MEDIUM”,
“dtiRatio”: 0.32,
“desiredDtiRatio”: 0.29,
“downPaymentRatio”: 0.2,
“desiredDownPaymentRatio”: 0.15,
“retirementImpact”: “NONE”,
“mortgageWillForeclose”: false
htrajan /
Created Feb 12, 2018
Binary Home Searching
@Inject BinarySearchSolver solver;
Function<Double, Affordability> affordabilityFn ...; // our mapping function that takes a number and returns an affordability
Function<Affordability, Boolean> manageableTargetTest = affordability -> affordability.getOrdinal() <= MANAGEABLE.getOrdinal();
double maxManageablePrice = solver.solveForMaxValuePassingTargetTest(
You can’t perform that action at this time.