EntityManagerService { public EntityModel getEntity(String entityName) throws IOException { return getEntity(entityName, Boolean.FALSE); }  List<EntityModel> getLegacyEntities(); List<EntityModel> getEntities(); EntityModel createEntity(EntityModel newEntity); EntityModel saveEntity(EntityModel entity); void deleteEntity(String entity); void deploySearchOptions(); void saveDbIndexes(); void savePii(); void saveAllUiData(List<EntityModel> entities); void saveEntityUiData(EntityModel entity); EntityModel getEntity(String entityName); EntityModel getEntity(String entityName, Boolean extendSubEntities); FlowModel getFlow(String entityName, FlowType flowType, String flowName); FlowModel createFlow(String entityName, FlowType flowType, FlowModel newFlow); void deleteFlow(String entityName, String flowName, FlowType flowType); JsonNode validatePlugin(
        HubConfig config,
        String entityName,
        String flowName,
        PluginModel plugin
    ); void saveFlowPlugin(
        PluginModel plugin
    ); static final String ENTITY_FILE_EXTENSION; }
@Test public void getEntity() throws IOException { EntityModel entity = entityMgrService.getEntity(ENTITY); assertEquals(ENTITY, entity.getName()); assertEquals(4, entity.getInputFlows().size()); assertEquals(0, entity.getHarmonizeFlows().size()); }
@Test public void getNoSuchEntity() throws IOException { Assertions.assertThrows(DataHubProjectException.class, () -> { EntityModel entity = entityMgrService.getEntity("no-such-entity"); fail("Fetching no entity should throw exception"); }); }