MemoryBasedConnectionLimitStrategy implements ConnectionLimitStrategy { @Override public String getResourcesDescription() { return "max. available memory: " + maxMemory / 1_000_000 + "MB"; } MemoryBasedConnectionLimitStrategy(final long memoryRequiredToStart, final long memoryRequiredPerConnection);   MemoryBasedConnectionLimitStrategy(final long memoryRequiredToStart, final long memoryRequiredPerConnection,
            final long maxMemory); @Override int getRecommendedLimit(); @Override String getResourcesDescription();  }
@Test public void getResourcesDescription() { assertEquals("max. available memory: 1MB", new MemoryBasedConnectionLimitStrategy(MINIMAL_MEMORY, MEMORY_PER_CONNECTION, 1_000_000).getResourcesDescription()); assertEquals("max. available memory: 10MB", new MemoryBasedConnectionLimitStrategy(MINIMAL_MEMORY, MEMORY_PER_CONNECTION, 10_000_000).getResourcesDescription()); }