String serverProfile) throws ControlServiceException { EndpointProfileDto endpointProfileDto = serverProfileService.saveServerProfile( Base64.decodeBase64(endpointKeyHash), version,
@Test public void testSaveServerProfile() throws IOException { ServerProfileSchemaDto schemaDto = generateServerProfileSchema(null, null); EndpointProfileDto ep = generateEndpointProfileDtoWithSchemaVersion(schemaDto.getApplicationId(), schemaDto.getVersion(), null); EndpointProfileDto updated = serverProfileService.saveServerProfile(ep.getEndpointKeyHash(), schemaDto.getVersion(), readSchemaFileAsString(TEST_PROFILE_BODY_PATH)); Assert.assertArrayEquals(ep.getEndpointKeyHash(), updated.getEndpointKeyHash()); Assert.assertNotEquals(ep.getServerProfileBody(), updated.getServerProfileBody()); Assert.assertEquals(ep.getServerProfileVersion(), updated.getServerProfileVersion()); }