Code example for RenamingDelegatingContext

0
	Account account;
	OptionsController controller;
 
	protected void setUp() throws Exception { 
		super.setUp(); 
		RenamingDelegatingContext context = new RenamingDelegatingContext(
				getContext(), "_test");
		controller = new OptionsController(context);
		account = Account.getInstance(context);
 
	} 
 
	public void testClearTransactions() { 
		account.addTransaction(10.0, new Date(), "test", new Category("test",
				0, account.getCategory(Constants.EXPENSE_ID)));
		controller.clearTransactions();
		if (account.getTransactions(2,
				account.getCategory(Constants.EXPENSE_ID)).size() != 0) {
			fail("Did not clear transactions");
		} 
Contextual code suggestions in your IDE  Get Codota for Java