  Strong gravitational lensing offers a compelling test of the cold dark matter
paradigm, as it allows for subhaloes with masses of $\sim10^{9}$ M$_\odot$ and
below to be detected. We test commonly-used techniques for detecting subhaloes
superposed in images of strongly lensed galaxies. For the lens we take a
simulated galaxy in a $\sim10^{13}$ M$_\odot$ halo grown in a high-resolution
cosmological hydrodynamical simulation, which we view from two different
directions. Though the resolution is high, we note the simulated galaxy still
has an artificial core which adds additional complexity to the baryon dominated
region. To remove particle noise, we represent the projected galaxy mass
distribution by a series of Gaussian profiles which precisely capture the
features of the projected galaxy. We first model the lens mass as a (broken)
power-law density profile and then search for small haloes. Of the two
projections, one has a regular elliptical shape, while the other has distinct
deviations from an elliptical shape. For the former, the broken power-law model
gives no false positives and correctly recovers the mass of the superposed
small halo, but for the latter we find false positives and the inferred halo
mass is overestimated by $\sim4-5$ times. We then use a more complex model in
which the lens mass is decomposed into stellar and dark matter components. In
this case, we show that we can capture the simulated galaxy's complex projected
structures and correctly infer the input small halo.
