@Test void testTransformMappedBysEmptyMap() { EntityType entityType = mock(EntityType.class); RelationTransformer.transformMappedBys(entityType, emptyMap()); verify(entityType, never()).getAtomicAttributes(); }
static void transformMappedBys(EntityType entityType, Map<String, Attribute> newAttributes) { if (newAttributes.isEmpty()) { return; } stream(entityType.getAtomicAttributes()) .filter(Attribute::isMappedBy) .forEach(attr -> transformMappedBy(attr, newAttributes)); }
RelationTransformer { static void transformMappedBys(EntityType entityType, Map<String, Attribute> newAttributes) { if (newAttributes.isEmpty()) { return; } stream(entityType.getAtomicAttributes()) .filter(Attribute::isMappedBy) .forEach(attr -> transformMappedBy(attr, newAttributes)); } }
RelationTransformer { static void transformMappedBys(EntityType entityType, Map<String, Attribute> newAttributes) { if (newAttributes.isEmpty()) { return; } stream(entityType.getAtomicAttributes()) .filter(Attribute::isMappedBy) .forEach(attr -> transformMappedBy(attr, newAttributes)); } private  RelationTransformer(); }
RelationTransformer { static void transformMappedBys(EntityType entityType, Map<String, Attribute> newAttributes) { if (newAttributes.isEmpty()) { return; } stream(entityType.getAtomicAttributes()) .filter(Attribute::isMappedBy) .forEach(attr -> transformMappedBy(attr, newAttributes)); } private  RelationTransformer();  }
RelationTransformer { static void transformMappedBys(EntityType entityType, Map<String, Attribute> newAttributes) { if (newAttributes.isEmpty()) { return; } stream(entityType.getAtomicAttributes()) .filter(Attribute::isMappedBy) .forEach(attr -> transformMappedBy(attr, newAttributes)); } private  RelationTransformer();   }