### Question:
SearchCriteriaFactory { public static SearchCriteriaBuilder create(DirectoryType directoryType){ SearchCriteriaBuilder searchCriteriaBuilder; switch (directoryType) { case MS_ACTIVE_DIRECTORY: searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl(); break; default: throw new NotImplementedException(); } return searchCriteriaBuilder; }  static SearchCriteriaBuilder create(DirectoryType directoryType);  }### Answer:
@Test public void testCreate() { SearchCriteriaBuilder SearchCriteriaBuilder = SearchCriteriaFactory.create(DirectoryType.MS_ACTIVE_DIRECTORY); assertTrue(SearchCriteriaBuilder instanceof ActiveDirectorySearchCriteriaBuilderImpl); }