@Override public void removeEndpointProfileByAppId(String appId) { validateSqlId(appId, "Can't remove endpoint profile by application id. Invalid application id " + appId); endpointProfileDao.removeByAppId(appId); }
@Test public void removeByAppId() { EndpointProfileDto endpointProfile = generateEndpointProfileDto(null, null); Assert.assertNotNull(endpointProfile); byte[] keyHash = endpointProfile.getEndpointKeyHash(); endpointProfileDao.removeByAppId(endpointProfile.getApplicationId()); MongoEndpointProfile found = endpointProfileDao.findByKeyHash(keyHash); Assert.assertNull(found); }