@Test
public void testGetPDFURLSameMimeTypes() throws Exception {

    context.turnOffAuthorisationSystem();
    Bundle bundle = ContentServiceFactory.getInstance().getBundleService().create(context, it, "ORIGINAL");;
    Bitstream b = bitstreamService.create(context, new ByteArrayInputStream("123456789".getBytes(Charsets.UTF_8)));
    b.setName(context, "size9");
    b.setFormat(context, bitstreamFormatService.create(context));
    b.getFormat(context).setMIMEType("application/pdf");
    bundleService.addBitstream(context, bundle, b);
    Bitstream b2 = bitstreamService.create(context, new ByteArrayInputStream("1".getBytes(Charsets.UTF_8)));
    b2.setName(context, "size1");
    b2.setFormat(context, bitstreamFormatService.create(context));
    b2.getFormat(context).setMIMEType("application/pdf");
    bundleService.addBitstream(context, bundle, b2);
    Bitstream b3 = bitstreamService.create(context, new ByteArrayInputStream("12345".getBytes(Charsets.UTF_8)));
    b3.setName(context, "size5");
    b3.setFormat(context, bitstreamFormatService.create(context));
    b3.getFormat(context).setMIMEType("text/richtext");
    bundleService.addBitstream(context, bundle, b3);
    context.restoreAuthSystemState();
    context.commit();
    GoogleMetadata gm = new GoogleMetadata(this.context, it);
    String[] urlSplitted = gm.getPDFURL().get(0).split("/");
    assertEquals("size9", urlSplitted[urlSplitted.length - 1]);
}