@@ -0,0 +1,1860 @@
+package com.epam.ta.reportportal.ws.controller;%0A%0Aimport com.epam.ta.reportportal.ws.BaseMvcTest;%0Aimport com.epam.ta.reportportal.ws.model.settings.AnalyticsResource;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport org.junit.Test;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.http.MediaType;%0A%0Aimport static org.springframework.http.MediaType.APPLICATION_JSON;%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;%0A%0A/**%0A * @author %3Ca href=%22mailto:ihar_kahadouski@epam.com%22%3EIhar Kahadouski%3C/a%3E%0A */%0Apublic class SettingsControllerTest extends BaseMvcTest %7B%0A%0A%09@Autowired%0A%09private ObjectMapper objectMapper;%0A%0A%09@Test%0A%09public void getServerSettings() throws Exception %7B%0A%09%09mockMvc.perform(get(%22/settings%22).with(token(oAuthHelper.getSuperadminToken()))).andExpect(status().isOk());%0A%09%7D%0A%0A%09@Test%0A%09public void updateAnalyticsSettings() throws Exception %7B%0A%09%09AnalyticsResource resource = new AnalyticsResource();%0A%09%09resource.setType(%22server.analytics.all%22);%0A%09%09resource.setEnabled(true);%0A%09%09mockMvc.perform(put(%22/settings/analytics%22).with(token(oAuthHelper.getSuperadminToken()))%0A%09%09%09%09.contentType(MediaType.APPLICATION_JSON)%0A%09%09%09%09.content(objectMapper.writeValueAsBytes(resource))).andExpect(status().isOk());%0A%09%7D%0A%0A%09@Test%0A%09public void saveAnalyticsSettingsNegative() throws Exception %7B%0A%09%09AnalyticsResource resource = new AnalyticsResource();%0A%09%09resource.setEnabled(true);%0A%09%09resource.setType(%22%22);%0A%09%09mockMvc.perform(put(%22/settings/analytics%22).with(token(oAuthHelper.getSuperadminToken()))%0A%09%09%09%09.contentType(APPLICATION_JSON)%0A%09%09%09%09.content(objectMapper.writeValueAsBytes(resource))).andExpect(status().isBadRequest());%0A%09%7D%0A%7D

Add tests