test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
  	public final
test_class.original_string: @Rule
  	public final ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.declarator: persistenceService = mock(CategoriesPersistenceService.class)
test_class.modifier: private final
test_class.original_string: private final CategoriesPersistenceService persistenceService = mock(CategoriesPersistenceService.class);
test_class.type: CategoriesPersistenceService
test_class.var_name: persistenceService
test_class.declarator: categoriesService = new CategoriesService(persistenceService,
  			new EntityEventSupport())
test_class.modifier: private final
test_class.original_string: private final CategoriesService categoriesService = new CategoriesService(persistenceService,
  			new EntityEventSupport());
test_class.type: CategoriesService
test_class.var_name: categoriesService
test_class.declarator: categories = new Categories(ImmutableList.of(new Category("A")))
test_class.modifier: private final
test_class.original_string: private final Categories categories = new Categories(ImmutableList.of(new Category("A")));
test_class.type: Categories
test_class.var_name: categories
test_class.declarator: savedCategories
test_class.modifier: private
test_class.original_string: private Categories savedCategories;
test_class.type: Categories
test_class.var_name: savedCategories
test_class.file: services/src/test/java/com/greensopinion/finance/services/domain/CategoriesServiceTest.java
test_class.identifier: CategoriesServiceTest
test_case.body: @Test
  	public void addRuleByName() {
  		MatchRule matchRule = MatchRule.withPattern("yo");
  		categoriesService.addRuleByName("a", matchRule);
  
  		Category category = savedCategories.getCategoryByName("a");
  		assertEquals(ImmutableList.of(matchRule), category.getMatchRules());
  	}
test_case.class_method_signature: CategoriesServiceTest.addRuleByName()
test_case.full_signature: @Test public void addRuleByName()
test_case.identifier: addRuleByName
test_case.invocations: withPattern addRuleByName getCategoryByName assertEquals of getMatchRules
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void addRuleByName()
focal_class.file: services/src/main/java/com/greensopinion/finance/services/domain/CategoriesService.java
focal_class.identifier: CategoriesService
focal_class.class_method_signature: CategoriesService.CategoriesService(CategoriesPersistenceService persistenceService, EntityEventSupport eventSupport)
focal_class.full_signature: @Inject  CategoriesService(CategoriesPersistenceService persistenceService, EntityEventSupport eventSupport)
focal_class.identifier: CategoriesService
focal_class.modifiers: @Inject
focal_class.parameters: (CategoriesPersistenceService persistenceService, EntityEventSupport eventSupport)
focal_class.signature:  CategoriesService(CategoriesPersistenceService persistenceService, EntityEventSupport eventSupport)
focal_class.class_method_signature: CategoriesService.create(Category category)
focal_class.full_signature: public void create(Category category)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (Category category)
focal_class.return: void
focal_class.signature: void create(Category category)
focal_class.class_method_signature: CategoriesService.deleteByName(String name)
focal_class.full_signature: public void deleteByName(String name)
focal_class.identifier: deleteByName
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: void
focal_class.signature: void deleteByName(String name)
focal_class.class_method_signature: CategoriesService.addRuleByName(String name, MatchRule matchRule)
focal_class.full_signature: public void addRuleByName(String name, MatchRule matchRule)
focal_class.identifier: addRuleByName
focal_class.modifiers: public
focal_class.parameters: (String name, MatchRule matchRule)
focal_class.return: void
focal_class.signature: void addRuleByName(String name, MatchRule matchRule)
focal_class.class_method_signature: CategoriesService.findCategoryByName(Categories categories, String name)
focal_class.full_signature: private Category findCategoryByName(Categories categories, String name)
focal_class.identifier: findCategoryByName
focal_class.modifiers: private
focal_class.parameters: (Categories categories, String name)
focal_class.return: Category
focal_class.signature: Category findCategoryByName(Categories categories, String name)
focal_class.superclass: extends ConfigurationService<Categories>
focal_method.body: public void addRuleByName(String name, MatchRule matchRule) {
  		Categories categories = retrieve();
  		Category category = findCategoryByName(categories, name);
  
  		List<Category> values = new ArrayList<>(categories.getCategories());
  		int indexOf = values.indexOf(category);
  		values.set(indexOf, category.withMatchRule(matchRule));
  
  		update(new Categories(values));
  	}
focal_method.class_method_signature: CategoriesService.addRuleByName(String name, MatchRule matchRule)
focal_method.full_signature: public void addRuleByName(String name, MatchRule matchRule)
focal_method.identifier: addRuleByName
focal_method.invocations: retrieve findCategoryByName getCategories indexOf set withMatchRule update
focal_method.modifiers: public
focal_method.parameters: (String name, MatchRule matchRule)
focal_method.return: void
focal_method.signature: void addRuleByName(String name, MatchRule matchRule)