FieldMap implements Cloneable { public boolean isDestFieldAccessible() { return determineAccess(destField, classMap.getDestClass()); } FieldMap(ClassMap classMap, BeanContainer beanContainer, DestBeanCreator destBeanCreator, PropertyDescriptorFactory propertyDescriptorFactory); ClassMap getClassMap(); void setClassMap(ClassMap classMap); Object getSrcFieldValue(Object runtimeSrcObj); void writeDestValue(Object runtimeDestObj, Object destFieldValue); Class<?> getDestHintType(Class<?> runtimeSrcClass); Class<?> getDestFieldType(Class<?> runtimeDestClass); Class<?> getSrcFieldType(Class<?> runtimeSrcClass); @Deprecated Class<?> getDestFieldWriteMethodParameter(Class<?> runtimeDestClass); Class<?> getGenericType(Class<?> runtimeDestClass); Object getDestValue(Object runtimeDestObj); HintContainer getDestHintContainer(); void setDestHintContainer(HintContainer destHint); HintContainer getSrcHintContainer(); void setSrcHintContainer(HintContainer sourceHint); String getSrcFieldMapGetMethod(); String getSrcFieldMapSetMethod(); String getDestFieldMapGetMethod(); String getDestFieldMapSetMethod(); String getSrcFieldName(); String getDestFieldName(); String getDestFieldType(); String getSrcFieldType(); String getDateFormat(); String getDestFieldCreateMethod(); String getSrcFieldCreateMethod(); boolean isDestFieldIndexed(); boolean isSrcFieldIndexed(); int getSrcFieldIndex(); int getDestFieldIndex(); String getSrcFieldTheGetMethod(); String getDestFieldTheGetMethod(); String getSrcFieldTheSetMethod(); String getDestFieldTheSetMethod(); String getSrcFieldKey(); String getDestFieldKey(); boolean isDestFieldAccessible(); boolean isSrcFieldAccessible(); void setSrcField(DozerField sourceField); void setDestField(DozerField destField); HintContainer getDestDeepIndexHintContainer(); void setDestDeepIndexHintContainer(HintContainer destDeepIndexHintHint); HintContainer getSrcDeepIndexHintContainer(); void setSrcDeepIndexHintContainer(HintContainer srcDeepIndexHint); @Override Object clone(); MappingDirection getType(); void setType(MappingDirection type); boolean isCopyByReference(); void setCopyByReference(boolean copyByReference); boolean isCopyByReferenceOveridden(); String getMapId(); void setMapId(String mapId); String getCustomConverter(); void setCustomConverter(String customConverter); RelationshipType getRelationshipType(); void setRelationshipType(RelationshipType relationshipType); void validate(); DozerField getSrcFieldCopy(); DozerField getDestFieldCopy(); String getCustomConverterId(); void setCustomConverterId(String customConverterId); boolean isRemoveOrphans(); void setRemoveOrphans(boolean removeOrphans); boolean isDestMapNull(); boolean isDestMapEmptyString(); boolean isTrimStrings(); boolean isStopOnErrors(); boolean isNonCumulativeRelationship(); @Override String toString(); String getCustomConverterParam(); void setCustomConverterParam(String customConverterParam);  }
@Test public void shouldBeAccessible_ClassLevel() { when(classMap.getDestClass().isAccessible()).thenReturn(Boolean.TRUE); when(field.isAccessible()).thenReturn(Boolean.FALSE); assertFalse(fieldMap.isDestFieldAccessible()); }
@Test public void shouldBeAccessible_Both() { when(classMap.getDestClass().isAccessible()).thenReturn(Boolean.TRUE); when(field.isAccessible()).thenReturn(Boolean.TRUE); assertTrue(fieldMap.isDestFieldAccessible()); }
@Test public void shouldBeAccessible_FieldLevel() { when(classMap.getDestClass().isAccessible()).thenReturn(Boolean.FALSE); when(field.isAccessible()).thenReturn(Boolean.TRUE); assertTrue(fieldMap.isDestFieldAccessible()); }
@Test public void shouldBeAccessible_Override() { when(classMap.getDestClass().isAccessible()).thenReturn(Boolean.TRUE); when(field.isAccessible()).thenReturn(Boolean.FALSE); assertFalse(fieldMap.isDestFieldAccessible()); }
@Test public void shouldBeAccessible_Null() { when(classMap.getDestClass().isAccessible()).thenReturn(false); when(field.isAccessible()).thenReturn(Boolean.TRUE); assertTrue(fieldMap.isDestFieldAccessible()); }
@Test public void shouldBeAccessible_FieldLevelNull() { when(classMap.getDestClass().isAccessible()).thenReturn(Boolean.TRUE); when(field.isAccessible()).thenReturn(null); assertTrue(fieldMap.isDestFieldAccessible()); }
@Test public void shouldBeAccessible_Default() { when(classMap.getDestClass().isAccessible()).thenReturn(false); when(field.isAccessible()).thenReturn(null); assertFalse(fieldMap.isDestFieldAccessible()); }