### Question:
ServiceConfigDAO { @RequiresSession public ServiceConfigEntity find(Long serviceConfigId) { return entityManagerProvider.get().find(ServiceConfigEntity.class, serviceConfigId); }  @RequiresSession ServiceConfigEntity find(Long serviceConfigId); @RequiresSession ServiceConfigEntity findByServiceAndVersion(String serviceName, Long version); @RequiresSession List<ServiceConfigEntity> findByService(Long clusterId, String serviceName); @RequiresSession List<ServiceConfigEntity> getLastServiceConfigVersionsForGroups(Collection<Long> configGroupIds); @RequiresSession ServiceConfigEntity getLastServiceConfigVersionsForGroup(Long configGroupId); @RequiresSession List<Long> getServiceConfigVersionsByConfig(Long clusterId, String configType, Long configVersion); @RequiresSession List<ServiceConfigEntity> getLastServiceConfigs(Long clusterId); @RequiresSession List<ServiceConfigEntity> getLastServiceConfigsForService(Long clusterId, String serviceName); @RequiresSession ServiceConfigEntity getLastServiceConfigForServiceDefaultGroup(Long clusterId, String serviceName); @RequiresSession List<ServiceConfigEntity> getServiceConfigsForServiceAndStack(Long clusterId,
      StackId stackId, String serviceName); @RequiresSession List<ServiceConfigEntity> getLatestServiceConfigs(Long clusterId,
      StackId stackId); @RequiresSession ServiceConfigEntity getLastServiceConfig(Long clusterId, String serviceName); @RequiresSession ServiceConfigEntity findMaxVersion(Long clusterId, String serviceName); @RequiresSession List<ServiceConfigEntity> getServiceConfigs(Long clusterId); @RequiresSession List<ServiceConfigEntity> findAll(); @RequiresSession Long findNextServiceConfigVersion(long clusterId, String serviceName); @Transactional void removeHostFromServiceConfigs(final Long hostId); @Transactional void create(ServiceConfigEntity serviceConfigEntity); @Transactional ServiceConfigEntity merge(ServiceConfigEntity serviceConfigEntity); @Transactional void remove(ServiceConfigEntity serviceConfigEntity);  }### Answer:
@Test public void testFindServiceConfigEntity() throws Exception { ServiceConfigEntity sce = createServiceConfig("HDFS", "admin", 1L, 1L, 1111L, null); ServiceConfigEntity serviceConfigEntity = serviceConfigDAO.find(sce.getServiceConfigId()); Long clusterId = clusterDAO.findByName("c1").getClusterId(); Assert.assertNotNull(serviceConfigEntity); Assert.assertEquals("c1", serviceConfigEntity.getClusterEntity().getClusterName()); Assert.assertEquals(clusterId, serviceConfigEntity.getClusterEntity() .getClusterId()); Assert.assertEquals("HDFS", serviceConfigEntity.getServiceName()); Assert.assertEquals(Long.valueOf(1111L), serviceConfigEntity.getCreateTimestamp()); Assert.assertEquals("admin", serviceConfigEntity.getUser()); Assert.assertEquals(Long.valueOf(1), serviceConfigEntity.getVersion()); Assert.assertTrue(serviceConfigEntity.getClusterConfigEntities().isEmpty()); Assert.assertNotNull(serviceConfigEntity.getServiceConfigId()); }