@Test
public final void givenDifferentAccessLevels_whenSetVisibility_thenSerializable() throws IOException {
final ObjectMapper mapper = new ObjectMapper();
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
final MyDtoAccessLevel dtoObject = new MyDtoAccessLevel();
final String dtoAsString = mapper.writeValueAsString(dtoObject);
assertThat(dtoAsString, containsString("stringValue"));
assertThat(dtoAsString, containsString("intValue"));
assertThat(dtoAsString, containsString("booleanValue"));