java – How to cover by tests HTTP API wrapping library

As mentioned in title, I don’t understand how I supposed to cover by tests code which is just wrap http api. I guess I can write only unit tests, because wrapped service is paid. Integration tests in my opinion isn’t required because goal is just provide strict structure of input and return raw output.


public class TsMessageServiceImpl implements TsMessageService {
    private final RestTemplate restTemplate;

    public Optional<TsResponse> send(TsSmsMessage smsMessage) {
        return this.send(new TsHybridMessageImpl(smsMessage));

    public Optional<TsResponse> send(TsViberMessage viberMessage) {
        return this.send(new TsHybridMessageImpl(viberMessage));

    public Optional<TsResponse> send(TsHybridMessage hybridMessage) {
        String url = TsEndpoint.MESSAGE_SEND.value();
        HttpEntity<TsHybridMessage> body = new HttpEntity<>(hybridMessage);
        Class<TsResponse> responseType = TsResponse.class;
        log.debug(new ObjectMapper().writeValueAsString(hybridMessage));
        ResponseEntity<TsResponse> response = restTemplate.postForEntity(url, body, responseType);
        return Optional.ofNullable(response.getBody());

wrapper – Wrapping a third party package class to achieve decoupling from the package

I want to create a wrapper around this third party package class so that I don’t litter my app with calls to it. The idea being that if there are breaking changes to the package (rename the class or one of its members), or if I want to delete the package, I can just change my implementation of it in this one file. Here is the third party package class:

abstract class GetWidget<T extends DisposableInterface>
    extends GetStatelessWidget {
  GetWidget({Key key}) : super(key: key);

  final Set<T> _value = <T>{};

  final String tag = null;

  T get controller {
    if (_value.isEmpty) _value.add(GetInstance().find<T>(tag: tag));
    return _value.first;

  Widget build(BuildContext context);

Here is my attempt to wrap it (Vp is my app prefix identifying that it was created by my app):

abstract class VpWidget<T extends DisposableInterface> extends GetWidget<T> {
  VpWidget({Key key}) : super(key: key);

  T get controller {
    return super.controller;

It seems to work. The class is so small anyway so i don’t think I can wrap anything more from it. Just wondering if this is an effective use of a wrapper for decoupling my app from the package, or if there is no use and I should just call the package class directly?

logging – fluentd record_transformer – wrapping $[record] in additional json objects

I’m changing how I’m consuming GCP logs from receiving a PubSub subscription push directly into my log analytics tool to pulling the PubSub subscription with Fluentd and then pushing the logs into the log analytics tool. The problem is that now I’m not getting some additional json wrapper objects around the log data and I need to put them back or the change will break all our dashboards and scheduled searches.

I’m trying to use record_transformer to add the wrapper objects and it’s not clear how to do this.

Given a message like this:

{"foo": "bar"}

I need it to come out like:

  "message": {
     "data": {
        "foo": "bar"

(I don’t need it pretty formatted, I just did that for readability here.)

I tried this:

<filter gcp.logs>
  @type record_transformer
    message data $(record)

But that doesn’t do the nesting of json objects that I was hoping for.

Any pointers in the right direction would be much appreciated.

Frontend – Is there a way to disable or enable text wrapping in cells?

I am trying to generate "Program" Cells, but my problem is different "Code" Cells, "Program" Cells automatically start wrapping text when the line is too long for the screen. Is there an option or something to do this "Program" Cells have no text wrap, so very long lines of code may disappear from the screen, but remain on the same line as "Code" Cells.

Here is an example "Program" Cell:

    StyleBox["Code:",FontWeight->"Bold"],"   ",
    " ... very long piece of code "<>long,"n",
    " ... very long comment ......"<>long
}], "Program"]

Here is an example "Code" Cell:

    StyleBox["Code:",FontWeight->"Bold"],"   ",
    " ... very long piece of code "<>long,"n",
    " ... very long comment ......"<>long
}], "Code"]

nt.number theory – Venkatesh's bullet wrapping paper and finite covolume

I read a work by Venkatesh in which he shows a lattice arrangement of spheres using a modification of the mean seal theorem.

Shortly before he gives Lemma 1, he writes it

Give $ G / Γ $ with the $ G $– invariant measure of probability, which we refer to as $ mu $

Here $ G $ the subgroup is given as $ SL_2 (K otimes _ { mathbb {Q}} mathbb {R}) $ Where $ K $ is a cyclotomic extension of $ mathbb {Q} $. This most likely means $ G = M_2 (K otimes_ mathbb {Q} mathbb {R}) cap SL (V_ mathbb {R}) $ Where $ M_2 (K otimes_ mathbb {Q} mathbb {R}) $ affects $ V_ mathbb {R} (K otimes _ { mathbb {Q}} mathbb {R}) ^ { oplus 2} $ in the obvious way.

Now I know that there is a Borel & Harish Chandra theorem that arithemetic groups are real semisimple groups. But is not the group $ G $ defined above has a non-trivial center and is therefore clearly not half easy?

Is there a more general version of Borel-Harish Chandra for reductive groups? What is the justification for the existence of a probability measure in the quotient space?

My knowledge of arithmetic subgroups is quite shallow.

Text wrapping with div

I have to wrap the text automatically and keep showing it under the number.

 border: 1px solid #000;
 vertical-align: middle;

 box-shadow: 2px 2px 5px ;

#conteudo00 {
	margin: 0 auto;
	text-align: left;


 Acesse seu e-mail

 Abra o e-mail que acabei de te enviar - Caso não ache, procure no SPAM e no lixo eletrônico em seu e-mail.

 Clique no link de download

 Leia o Ebook com Muita Atenção

 Fique de olhos nos meus próximos e-mails, enviarei conteúdos!

 Clique no botão ao topo desta página para receber conteúdos EXCLUSIVOS no meu canal do Telegram

8 – How do I remove fieldset wrapping radios and checkbox items?

Therefore, Drupal 8 is wrapped by its standard internal form rendering process radios and checkeboxes Group in fieldset Element that makes the HTML output somewhat complicated.

To change such a rendering operation to remove the fieldset Label ?

I've already looked at these threads here and here, but I have not figured out which hook to use.

To get an idea of ​​what I mean, I added gender Extract field to the standard Drupal 8 contact form and below the HTML output:

Choose your gender.

I appreciate your help.