.setPath("src/main/java/org/sonar/api/Plugin.java")
.setSubProjectId(5L);
when(componentDao.getNullableByKey(session, COMPONENT_KEY)).thenReturn(file);
when(componentDao.getById(5L, session)).thenReturn(new ComponentDto().setId(5L).setLongName("SonarQube :: Plugin API").setKey(SUB_PROJECT_KEY));
when(componentDao.getByUuid(session, project.uuid())).thenReturn(project);
when(propertiesDao.selectByQuery(any(PropertyQuery.class), eq(session))).thenReturn(newArrayList(new PropertyDto()));
WsTester.TestRequest request = tester.newGetRequest("api/components", "app").setParam("key", COMPONENT_KEY);
request.execute().assertJson(getClass(), "app.json");
}