### Question:
SMONMemoryWorkaroundService { public String firehoseNonJavaMemoryBytes(StackType stackType, Set<String> componentsByHostGroup) { if (isDataLake(stackType)) { return calculateSmonMemoryParameterBasedOnServices( stackType, componentsByHostGroup, datalakeNormalFirehoseNonJavaMemoryBytes, datalakeExtensiveFirehoseNonJavaMemoryBytes); } else { return calculateSmonMemoryParameterBasedOnServices( stackType, componentsByHostGroup, datahubNormalFirehoseNonJavaMemoryBytes, datahubExtensiveFirehoseNonJavaMemoryBytes); } }  String firehoseHeapsize(StackType stackType, Set<String> componentsByHostGroup); String firehoseNonJavaMemoryBytes(StackType stackType, Set<String> componentsByHostGroup);  }### Answer:
@Test public void getFirehoseHeapsizeWhenDHAndRegionServerInTheBlueprintShouldReturnHighMemoryforDH() { Assert.assertEquals("4294967296", underTest.firehoseNonJavaMemoryBytes(StackType.WORKLOAD, Sets.newHashSet("REGIONSERVER"))); }
@Test public void getFirehoseNonJavaMemoryBytesWhenDLAndNoRegionServerInTheBlueprintShouldReturnLowMemoryforDL() { Assert.assertEquals("1073741824", underTest.firehoseNonJavaMemoryBytes(StackType.DATALAKE, Sets.newHashSet())); }
@Test public void getFirehoseNonJavaMemoryBytesWhenDLAndRegionServerInTheBlueprintShouldReturnHighMemoryforDL() { Assert.assertEquals("3221225472", underTest.firehoseNonJavaMemoryBytes(StackType.DATALAKE, Sets.newHashSet("REGIONSERVER"))); }
@Test public void getFirehoseNonJavaMemoryBytesWhenDHAndNoRegionServerInTheBlueprintShouldReturnLowMemoryforDH() { Assert.assertEquals("2147483648", underTest.firehoseNonJavaMemoryBytes(StackType.WORKLOAD, Sets.newHashSet())); }
@Test public void getFirehoseNonJavaMemoryBytesWhenDHAndRegionServerInTheBlueprintShouldReturnHighMemoryforDH() { Assert.assertEquals("4294967296", underTest.firehoseNonJavaMemoryBytes(StackType.WORKLOAD, Sets.newHashSet("REGIONSERVER"))); }