### Question:
PatientSearchCriteria { Boolean isShortName(String name) { Integer minChars = Context.getAdministrationService().getGlobalPropertyValue( OpenmrsConstants.GLOBAL_PROPERTY_MIN_SEARCH_CHARACTERS, OpenmrsConstants.GLOBAL_PROPERTY_DEFAULT_MIN_SEARCH_CHARACTERS); if (name != null && name.length() < minChars) { return Boolean.TRUE; } else { return Boolean.FALSE; } } PatientSearchCriteria(SessionFactory sessionFactory, Criteria criteria); Criteria prepareCriteria(String name, String identifier, List<PatientIdentifierType> identifierTypes,
	        boolean matchIdentifierExactly, boolean orderByNames, boolean searchOnNamesOrIdentifiers);  }### Answer:
@Test public void isShortName_shouldRecogniseShortName() { Assert.assertTrue(patientSearchCriteria.isShortName("J")); }
@Test public void isShortName_shouldRecogniseLongName() { Assert.assertFalse(patientSearchCriteria.isShortName("Jo")); }
@Test public void isShortName_shouldRecogniseShortName() throws Exception { Assert.assertTrue(patientSearchCriteria.isShortName("J")); }
@Test public void isShortName_shouldRecogniseLongName() throws Exception { Assert.assertFalse(patientSearchCriteria.isShortName("Jo")); }