### Question:
DefaultMapper extends AbstractMapper<Object> { @Override public Map<Path<?>, Object> createMap(RelationalPath<?> entity, Object bean) { try { Map<Path<?>, Object> values = Maps.newLinkedHashMap(); Class<?> beanClass = bean.getClass(); Map<String, Path<?>> columns = getColumns(entity); for (Map.Entry<String, Path<?>> entry : columns.entrySet()) { Path<?> path = entry.getValue(); Field beanField = ReflectionUtils.getFieldOrNull(beanClass, entry.getKey()); if (beanField != null && !Modifier.isStatic(beanField.getModifiers())) { beanField.setAccessible(true); Object propertyValue = beanField.get(bean); if (propertyValue != null) { values.put(path, propertyValue); } else if (withNullBindings && !isPrimaryKeyColumn(entity, path)) { values.put(path, Null.DEFAULT); } } } return values; } catch (IllegalAccessException e) { throw new QueryException(e); } } DefaultMapper();  DefaultMapper(boolean withNullBindings); @Override Map<Path<?>, Object> createMap(RelationalPath<?> entity, Object bean); static final DefaultMapper DEFAULT; static final DefaultMapper WITH_NULL_BINDINGS; }### Answer:
@Test public void extract() { Map<Path<?>, Object> values = DefaultMapper.DEFAULT.createMap(emp, employee); assertEquals(employee.getDatefield(), values.get(emp.datefield)); assertEquals(employee.getFirstname(), values.get(emp.firstname)); assertEquals(employee.getLastname(), values.get(emp.lastname)); assertEquals(employee.getSalary(), values.get(emp.salary)); assertEquals(employee.getSuperiorId(), values.get(emp.superiorId)); assertEquals(employee.getTimefield(), values.get(emp.timefield)); }
@Test public void extract2() { Map<Path<?>, Object> values = DefaultMapper.DEFAULT.createMap(emp, new EmployeeX()); assertTrue(values.isEmpty()); }