    @Test
    public void getTopologyConfigWhileAuthenticated() {

        final Topology mockedTopology = RandomGenerator.randomObject(Topology.class);
        
        doReturn(mockedTopology)
                .when(topologyServiceMock)
                .getTopology(mockedTopology.getId(), TEST_SUBJECT_ID);
        
        mockAuthenticatedSubject();
              
        TopologyConfig responseTopologyConfig = resource()
            .path("/api/topologies/" + mockedTopology.getId() + "/config")
            .accept(MediaType.APPLICATION_JSON).get(TopologyConfig.class);
        
        assertEquals("Response topology should match the mocked topology", 
                mockedTopology.getCurrentConfig(), responseTopologyConfig);
        
        verify(topologyServiceMock)
                .getTopology(mockedTopology.getId(), TEST_SUBJECT_ID);
    }