@Test void testTransformExtendsEmptyMap() { EntityType entityType = mock(EntityType.class); RelationTransformer.transformExtends(entityType, emptyMap()); verify(entityType, never()).setExtends(any(EntityType.class)); }
static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { if (newEntityTypes.isEmpty()) { return; } EntityType entityTypeExtends = entityType.getExtends(); if (entityTypeExtends != null) { String extendsId = entityTypeExtends.getId(); if (newEntityTypes.containsKey(extendsId)) { entityType.setExtends(newEntityTypes.get(extendsId)); } } }
RelationTransformer { static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { if (newEntityTypes.isEmpty()) { return; } EntityType entityTypeExtends = entityType.getExtends(); if (entityTypeExtends != null) { String extendsId = entityTypeExtends.getId(); if (newEntityTypes.containsKey(extendsId)) { entityType.setExtends(newEntityTypes.get(extendsId)); } } } }
RelationTransformer { static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { if (newEntityTypes.isEmpty()) { return; } EntityType entityTypeExtends = entityType.getExtends(); if (entityTypeExtends != null) { String extendsId = entityTypeExtends.getId(); if (newEntityTypes.containsKey(extendsId)) { entityType.setExtends(newEntityTypes.get(extendsId)); } } } private  RelationTransformer(); }
RelationTransformer { static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { if (newEntityTypes.isEmpty()) { return; } EntityType entityTypeExtends = entityType.getExtends(); if (entityTypeExtends != null) { String extendsId = entityTypeExtends.getId(); if (newEntityTypes.containsKey(extendsId)) { entityType.setExtends(newEntityTypes.get(extendsId)); } } } private  RelationTransformer();  }
RelationTransformer { static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { if (newEntityTypes.isEmpty()) { return; } EntityType entityTypeExtends = entityType.getExtends(); if (entityTypeExtends != null) { String extendsId = entityTypeExtends.getId(); if (newEntityTypes.containsKey(extendsId)) { entityType.setExtends(newEntityTypes.get(extendsId)); } } } private  RelationTransformer();   }