### Question:
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }  @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity entity, SuperdocConverter.Option option); @Override Iterable<Entity> subdocToBodyField(Iterable<Entity> entities); @Override void bodyFieldToSubdoc(Iterable<Entity> entities); @Override void bodyFieldToSubdoc(Iterable<Entity> entities, SuperdocConverter.Option option);  }### Answer:
@Test public void testBodyFieldToSubdoc() { List<Entity> entities = Arrays.asList(createDownConvertEntity()); assertNotNull("studentAssessment body should have studentAssessmentItem", entities.get(0).getBody().get("studentAssessmentItems")); assertNull("studentAssessmentItem should not be outside the studentAssessment body", entities.get(0) .getEmbeddedData().get("studentAssessmentItem")); saConverter.bodyFieldToSubdoc(entities); assertNull("studentAssessment body should not have studentAssessmentItem", entities.get(0).getBody().get("studentAssessmentItems")); assertNotNull("studentAssessmentItem should be moved outside body", entities.get(0).getEmbeddedData().get("studentAssessmentItem")); }
@SuppressWarnings("unchecked") @Test public void testSubdocDid() { List<Entity> entities = Arrays.asList(createDownConvertEntity()); assertNull( "studentAssessmentItem should not have id before transformation", ((List<Map<String, Object>>) (entities.get(0).getBody().get("studentAssessmentItems"))).get(0).get( "_id")); saConverter.bodyFieldToSubdoc(entities); assertFalse("subdoc id should be generated", entities.get(0).getEmbeddedData().get("studentAssessmentItem") .get(0).getEntityId().isEmpty()); }