SortFieldBuilderImpl implements SortFieldBuilder { @Override public String getSortField(String entityClassName, String orderByCol) { String sortField = doGetSortField(entityClassName, orderByCol); if (_defaultSortableTextFields.contains(sortField)) { return Field.getSortableFieldName(sortField); } return sortField; }  @Override String getSortField(String entityClassName, String orderByCol); @Override String getSortField(
		String entityClassName, String orderByCol, int sortType);  }
@Test public void testGetSortFieldWithNoSortFieldTranslator() { Mockito.when( _indexer.getSortField(Mockito.anyString()) ).thenAnswer( invocation -> invocation.getArgumentAt(0, String.class) ); String sortFieldName = _sortFieldBuilderImpl.getSortField( "modelClassName", "testField"); Assert.assertEquals("testField", sortFieldName); sortFieldName = _sortFieldBuilderImpl.getSortField( "modelClassName", "firstName"); Assert.assertEquals( Field.getSortableFieldName("firstName"), sortFieldName); sortFieldName = _sortFieldBuilderImpl.getSortField( "modelClassName", "testField", Sort.DOUBLE_TYPE); Assert.assertEquals( Field.getSortableFieldName("testField"), sortFieldName); sortFieldName = _sortFieldBuilderImpl.getSortField( "modelClassName", "testField", Sort.FLOAT_TYPE); Assert.assertEquals( Field.getSortableFieldName("testField"), sortFieldName); sortFieldName = _sortFieldBuilderImpl.getSortField( "modelClassName", "testField", Sort.INT_TYPE); Assert.assertEquals( Field.getSortableFieldName("testField"), sortFieldName); sortFieldName = _sortFieldBuilderImpl.getSortField( "modelClassName", "testField", Sort.LONG_TYPE); Assert.assertEquals( Field.getSortableFieldName("testField"), sortFieldName); }