public static int getStorageNodeIndex(ApplicationInstance application, HostName hostName) {
        Optional<ServiceInstance> storageNode = getStorageNodeAtHost(application, hostName);
        if (storageNode.isEmpty()) {
            throw new IllegalArgumentException("Failed to find a storage node for application " +
                    application.applicationInstanceId() + " at host " + hostName);
        }

        return getStorageNodeIndex(storageNode.get().configId());
    }
@Test
    public void testGetStorageNodeIndex() {
        ConfigId configId = TestUtil.storageNodeConfigId(CONTENT_CLUSTER_ID.toString(), 3);
        assertEquals(3, VespaModelUtil.getStorageNodeIndex(configId));
    }