#vulnerable code 
                                @Test
    public void reactsToMessage() throws Exception {
        final Reaction reaction = Mockito.mock(Reaction.class);
        new TkViber(new FkFarm(), reaction).act(
            new RqWithBody(
                new RqFake("POST", "/"),
                new TextOf(
                    TkViberTest.class.getResourceAsStream("message.json")
                ).asString()
            )
        );
        Mockito.verify(reaction)
            .react(Mockito.any(), Mockito.any(), Mockito.any());
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void reactsToMessage() throws Exception {
        final Reaction reaction = Mockito.mock(Reaction.class);
        final FkFarm farm = new FkFarm();
        final VbBot bot = new VbBot();
        final String callback = new TextOf(
            TkViberTest.class.getResourceAsStream("message.json")
        ).asString();
        new TkViber(farm, bot, reaction).act(
            new RqWithBody(
                new RqFake("POST", "/"),
                callback
            )
        );
        Mockito.verify(reaction)
            .react(
                Mockito.eq(bot), Mockito.eq(farm), Mockito.argThat(
                    event -> event.json()
                        .equals(
                            Json.createReader(new StringReader(callback))
                                .readObject()
                        )
                )
            );
    }