public int getTotalResourceCount() {
        return resources.isEmpty() ? 0 : resources.values().stream().reduce(0, Integer::sum);
    }
@Test
    void testGetTotalResourceCount() {
        final Map<ResourceProfile, Integer> resources = createResources();

        final ResourceCounter resourceCounter = ResourceCounter.withResources(resources);

        assertThat(resourceCounter.getTotalResourceCount()).isEqualTo(5);
    }