@Test
    public void transformedEndpointReturnsPostsWithCurrentDate() {
        //This unit-test class is the wrong place to test that behaviour, unless it becomes an integration test
        //Given
        TransformedForumPosts transformed = generateTransformedTestPosts();
        when(exampleApiService.getTransformedPosts()).thenReturn(transformed);
        //When
        TransformedForumPosts controllerOutput = exerciseController.transformed();
        //Then
        assertEquals(controllerOutput.size(), 2);
        assertTrue(controllerOutput.get(0).getTitle().contains("Test"));
        assertTrue(controllerOutput.get(0).getUppercaseTitle().contains("TEST"));
        assertTrue(controllerOutput.get(0).getPostDate().matches("\\d{4}-[01]\\d-[0-3]\\d"));
    }
@Test
    public void transformedEndpointReturnsPostsWithCurrentDate() {
       
       
        TransformedForumPosts transformed = generateTransformedTestPosts();
        when(exampleApiService.getTransformedPosts()).thenReturn(transformed);
       
        TransformedForumPosts controllerOutput = exerciseController.transformed();
       
        assertEquals(controllerOutput.size(), 2);
        assertTrue(controllerOutput.get(0).getTitle().contains("Test"));
        assertTrue(controllerOutput.get(0).getUppercaseTitle().contains("TEST"));
        assertTrue(controllerOutput.get(0).getPostDate().matches("\\d{4}-[01]\\d-[0-3]\\d"));
    }
@test public void transformedendpointreturnspostswithcurrentdate() { transformedforumposts transformed = generatetransformedtestposts(); when(exampleapiservice.gettransformedposts()).thenreturn(transformed); transformedforumposts controlleroutput = exercisecontroller.transformed(); assertequals(controlleroutput.size(), 2); asserttrue(controlleroutput.get(0).gettitle().contains("test")); asserttrue(controlleroutput.get(0).getuppercasetitle().contains("test")); asserttrue(controlleroutput.get(0).getpostdate().matches("\\d{4}-[01]\\d-[0-3]\\d")); }