### Question:
IPNetworkRang { public static Integer masktoNumberOfNodes(Integer mask) { return Integer .parseInt(((Integer) ((Double) Math.pow(2, 32 - mask)).intValue()).toString()); }  static Integer masktoNumberOfNodes(Integer mask); static Integer numberOfNodesToMask(Integer numOfNodes); static IPAddress transformIntegerMaskToIPMask(Integer mask); static List<IPAddress> calculateWholeRange(IPAddress networkAddress, Integer mask); static Integer transformIPMaskToIntegerMask(IPAddress ipAddress); static IPAddress lastIPAddressWithNumNodes(IPAddress networkAddress,
        Integer numberOfNodes);  }### Answer:
@Test public void testMasktoNumberOfNodes() { assertEquals((Integer) 1, IPNetworkRang.masktoNumberOfNodes(32)); assertEquals((Integer) 256, IPNetworkRang.masktoNumberOfNodes(24)); assertEquals((Integer) 65536, IPNetworkRang.masktoNumberOfNodes(16)); assertEquals((Integer) 16777216, IPNetworkRang.masktoNumberOfNodes(8)); assertEquals((Integer) 2147483647, IPNetworkRang.masktoNumberOfNodes(0)); }