source: class MetricsControllerTest {
  
      private MockMvc mockMvc;
      @Autowired
      private WebApplicationContext wac;
      @Autowired
      private MetricsService metricsService;
  
      @Test
      public void getProductMetricDetail() throws Exception {
  
target:         when(metricsService.getProductMetricDetail(MetricType.SCM_COMMITS,"portfolio1", "lob","product1")).thenReturn(TestUtils.makeProductMetricDetail());
          mockMvc.perform(MockMvcRequestBuilders.get("/metrics/SCM/product/portfolio1/lob/product1/detail"))
                  .andDo(print())
                  .andExpect(status().isOk());
          verify(metricsService).getProductMetricDetail(null,"portfolio1", "lob","product1");
      }
  
  }