How to test a histogram against a specific distribution? Prerequisites
If I have given


*

*a histogram $y_1, \ldots, y_m$,

*as a hypothesis for the underlying distribution some discrete iid random variables $X_1, \ldots, X_n$ supported in $\mathbb Z$

*where the $y_1, \ldots, y_m$ are realisations of $Y_1, \ldots, Y_m$ respectively with


$$
Y_k := \sum_{i=1}^n \delta_{kX_i} \quad, k=1,\ldots, m.
$$
Here $\delta_{kX_i}$ denotes the Kronecker delta.
Now, I am looking for a statistical test for the goodness of fit for the hypothesized distribution. All parameters for the distributions $X_1,\ldots, X_n$ are known a priori. 
Question
What is the general approach to such a problem?
 A: This is definitely too long for a comment and suggests some potential answers, but I hope to expand on it once you address the issues.
...

a histogram $y_1,…,y_m$

Are the categories always on a lattice, and these are actually observations from a discrete distribution on a lattice (so we have ordering and equispacing)?

I am looking for a statistical test which tells me whether the hypothesis is true.

No test will tell you whether a distributional hypothesis is true.
There are a variety of possible tests for the goodness of fit of a hypothesized distribution.
Is there any parameter estimation involved here? 

I am not looking for a parameter test.

Do you mean a parametric test?

What is the solution for the hypothesis X1,…,Xn∼Geo(p)?

Is $p$ known? What do the first few $Y$'s look like here?
---
A commonly used approach would be to perform a chi-square for this kind of goodness of fit, but this is usually not a good idea because it ignores the ordering (losing power to uninteresting alternatives). If I've understood everything correctly, I'd suggest either an Anderson-Darling (but modified to allow for the discreteness - which will probably require simulation of the null distribution), or a Smooth Test (see the discussion and links here).
For tests other than Smooth Tests, see:
D'Agostino, R. B. and Stephens, M. A. (1986).
Goodness-of-Fit Techniques.
New York: Marcel Dekker.  
If you have parameter estimation, things become more complex, but can be dealt with.
---
In respect of your previously mentioned Geometric distribution example, a smooth test for the geometric is covered in
Best, D.J. and Rayner, J.C.W. (2003).
"Tests of fit for the geometric distribution."
Communications in Statistics - Simulation and Computation,
32 (4), 1065-1078.  
It's also in Section 8.4 of 
Rayner J. C. W., O. Thas, D. J. Best. (2009),
Smooth Tests of Goodness of Fit: Using R, 2nd Edition.
ISBN: 978-0-470-82442-9
http://biomath.ugent.be/~othas/smooth2/Home.html
R packages that do smooth tests include ddst and smoothtest. The package ddst doesn't do the geometric case (though it does do the exponential distribution). I haven't checked what smoothtest contains, but since it does with the book linked just above, I expect it may implement the geometric one there. I don't know whether smoothtest runs under the most recent version of R, (but older versions of R can be set up).
